You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by jo...@apache.org on 2017/01/28 02:15:56 UTC
[01/11] mesos git commit: CMake: Deleted spurious configuration
settings in agent and master.
Repository: mesos
Updated Branches:
refs/heads/master 23e0ec207 -> 2d0195eed
CMake: Deleted spurious configuration settings in agent and master.
This removes a couple of copy-pasted and un-used variable definitions.
Review: https://reviews.apache.org/r/55748/
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/efb4435c
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/efb4435c
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/efb4435c
Branch: refs/heads/master
Commit: efb4435c85f1d1e63b89d15c9ea884e2e52b29aa
Parents: 15b4cae
Author: Alex Clemmer <cl...@gmail.com>
Authored: Fri Jan 27 16:58:05 2017 -0800
Committer: Joseph Wu <jo...@apache.org>
Committed: Fri Jan 27 18:15:41 2017 -0800
----------------------------------------------------------------------
src/master/cmake/MasterConfigure.cmake | 50 -----------------------------
src/slave/cmake/AgentConfigure.cmake | 50 -----------------------------
2 files changed, 100 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/efb4435c/src/master/cmake/MasterConfigure.cmake
----------------------------------------------------------------------
diff --git a/src/master/cmake/MasterConfigure.cmake b/src/master/cmake/MasterConfigure.cmake
index 66a5080..e9d6270 100644
--- a/src/master/cmake/MasterConfigure.cmake
+++ b/src/master/cmake/MasterConfigure.cmake
@@ -84,53 +84,3 @@ if (NOT ENABLE_LIBEVENT)
elseif (ENABLE_LIBEVENT)
set(MASTER_LIBS ${MASTER_LIBS} ${LIBEVENT_LFLAG})
endif (NOT ENABLE_LIBEVENT)
-
-
-############################################################
-
-
-set(
- PROCESS_MASTER_TARGET master
- CACHE STRING "Master target")
-
-
-# DEFINE PROCESS MASTER LIBRARY DEPENDENCIES. Tells the process library build
-# tests target download/configure/build all third-party libraries before
-# attempting to build.
-###########################################################################
-set(PROCESS_MASTER_DEPENDENCIES
- ${PROCESS_MASTER_DEPENDENCIES}
- ${PROCESS_DEPENDENCIES}
- )
-
-if (WIN32)
- set(PROCESS_MASTER_DEPENDENCIES
- ${PROCESS_MASTER_DEPENDENCIES}
- )
-endif (WIN32)
-
-# DEFINE THIRD-PARTY INCLUDE DIRECTORIES. Tells compiler toolchain where to get
-# headers for our third party libs (e.g., -I/path/to/glog on Linux).
-###############################################################################
-set(PROCESS_MASTER_INCLUDE_DIRS
- ${PROCESS_MASTER_INCLUDE_DIRS}
- ${MASTER_INCLUDE_DIRS}
- ${PROTOBUF_INCLUDE_DIR}
- src
- )
-
-if (WIN32)
- set(PROCESS_MASTER_INCLUDE_DIRS
- ${PROCESS_MASTER_INCLUDE_DIRS}
- ${MASTER_INCLUDE_DIRS}
- )
-endif (WIN32)
-
-# DEFINE THIRD-PARTY LIB INSTALL DIRECTORIES. Used to tell the compiler
-# toolchain where to find our third party libs (e.g., -L/path/to/glog on
-# Linux).
-########################################################################
-set(PROCESS_MASTER_LIB_DIRS
- ${PROCESS_MASTER_LIB_DIRS}
- ${MASTER_LIB_DIRS}
- )
http://git-wip-us.apache.org/repos/asf/mesos/blob/efb4435c/src/slave/cmake/AgentConfigure.cmake
----------------------------------------------------------------------
diff --git a/src/slave/cmake/AgentConfigure.cmake b/src/slave/cmake/AgentConfigure.cmake
index 93d6fed..8d930d3 100644
--- a/src/slave/cmake/AgentConfigure.cmake
+++ b/src/slave/cmake/AgentConfigure.cmake
@@ -100,53 +100,3 @@ if (NOT ENABLE_LIBEVENT)
elseif (ENABLE_LIBEVENT)
set(AGENT_LIBS ${AGENT_LIBS} ${LIBEVENT_LFLAG})
endif (NOT ENABLE_LIBEVENT)
-
-
-############################################################
-
-
-set(
- PROCESS_AGENT_TARGET slave
- CACHE STRING "Agent target")
-
-
-# DEFINE PROCESS AGENT LIBRARY DEPENDENCIES. Tells the process library build
-# tests target download/configure/build all third-party libraries before
-# attempting to build.
-###########################################################################
-set(PROCESS_AGENT_DEPENDENCIES
- ${PROCESS_AGENT_DEPENDENCIES}
- ${PROCESS_DEPENDENCIES}
- )
-
-if (WIN32)
- set(PROCESS_AGENT_DEPENDENCIES
- ${PROCESS_AGENT_DEPENDENCIES}
- )
-endif (WIN32)
-
-# DEFINE THIRD-PARTY INCLUDE DIRECTORIES. Tells compiler toolchain where to get
-# headers for our third party libs (e.g., -I/path/to/glog on Linux).
-###############################################################################
-set(PROCESS_AGENT_INCLUDE_DIRS
- ${PROCESS_AGENT_INCLUDE_DIRS}
- ${AGENT_INCLUDE_DIRS}
- ${PROTOBUF_INCLUDE_DIR}
- src
- )
-
-if (WIN32)
- set(PROCESS_AGENT_INCLUDE_DIRS
- ${PROCESS_AGENT_INCLUDE_DIRS}
- ${AGENT_INCLUDE_DIRS}
- )
-endif (WIN32)
-
-# DEFINE THIRD-PARTY LIB INSTALL DIRECTORIES. Used to tell the compiler
-# toolchain where to find our third party libs (e.g., -L/path/to/glog on
-# Linux).
-########################################################################
-set(PROCESS_AGENT_LIB_DIRS
- ${PROCESS_AGENT_LIB_DIRS}
- ${AGENT_LIB_DIRS}
- )
[10/11] mesos git commit: CMake: Bumped CMake version on Windows,
and enforce with check.
Posted by jo...@apache.org.
CMake: Bumped CMake version on Windows, and enforce with check.
This commit will bump the required CMake version on Windows from 3.5.2
(documented requirement, but not enforced) to 3.6.3, and then add a
configure-time check to ensure that this is true before we build.
On Windows, bumping the required version is much less of a big deal than
Unix, mainly because Windows does not have a package manager. The burden
on developers is about the same, independent of the version, because the
most convenient installation option is to use a `.msi`. Additionally,
CMake is not widely used in the community, and where it is, the vast
majority of users are building on Unix, so there are few constraints
imposed by existing CI systems and users.
The primary reason to bump the version, though, is that the CMake
featureset on Windows tends (consciously or not) to straggle a bit
behind the Unix featureset, and recently it has come to our attention
that (due to our ignorance of this issue) we have come to depend on some
subtle features that are available on Unix, but not on Windows, until
CMake 3.6.
Review: https://reviews.apache.org/r/56037/
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/5b8b9071
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/5b8b9071
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/5b8b9071
Branch: refs/heads/master
Commit: 5b8b90714f0019616c8917881e50400036a2fc26
Parents: efb4435
Author: Alex Clemmer <cl...@gmail.com>
Authored: Fri Jan 27 17:10:35 2017 -0800
Committer: Joseph Wu <jo...@apache.org>
Committed: Fri Jan 27 18:15:42 2017 -0800
----------------------------------------------------------------------
CMakeLists.txt | 6 +++++-
docs/windows.md | 2 +-
2 files changed, 6 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/5b8b9071/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7f4b5d0..18279c7 100755
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -16,7 +16,11 @@
# THE MESOS PROJECT.
####################
-cmake_minimum_required(VERSION 2.8.10)
+if (NOT WIN32)
+ cmake_minimum_required(VERSION 2.8.10)
+else (NOT WIN32)
+ cmake_minimum_required(VERSION 3.6.3)
+endif (NOT WIN32)
project(Mesos)
set(MESOS_MAJOR_VERSION 1)
http://git-wip-us.apache.org/repos/asf/mesos/blob/5b8b9071/docs/windows.md
----------------------------------------------------------------------
diff --git a/docs/windows.md b/docs/windows.md
index 5a5f934..60de30a 100644
--- a/docs/windows.md
+++ b/docs/windows.md
@@ -16,7 +16,7 @@ Mesos 1.0.0 introduced experimental support for Windows.
1. Install the latest version of [Visual Studio Community 2015](https://www.visualstudio.com/post-download-vs?sku=community).
Make sure to select the Common Tools for Visual C++ and the Windows 10 SDK.
Start Visual Studio Community to complete the setup and configuration.
-2. Install [CMake 3.5.2 or later](https://cmake.org/files/v3.5/cmake-3.5.2-win32-x86.msi).
+2. Install [CMake 3.6.3 or later](https://cmake.org/files/v3.6/cmake-3.6.3-win32-x86.msi).
Do not run CMake before finishing the Visual Studio Community setup.
3. Install [Gnu Patch 2.5.9-7 or later](http://downloads.sourceforge.net/project/gnuwin32/patch/2.5.9-7/patch-2.5.9-7-setup.exe).
4. If building from git, make sure you have Windows-style line endings.
[02/11] mesos git commit: CMake: Marked 3rdparty headers as "system"
headers.
Posted by jo...@apache.org.
CMake: Marked 3rdparty headers as "system" headers.
Because we pull in and build against 3rdparty libraries, we also pull
in the warnings from these 3rdparty libraries. In most cases, these
warnings can only be addressed by updating the 3rdparty source.
Trivial warnings can be eliminated simply by marking 3rdparty
libraries as `SYSTEM` headers when we specify the include path.
This commit will thus separate out the headers of Stout's 3rdparty
libraries from the Stout API headers, and include them as
`SYSTEM` headers.
Review: https://reviews.apache.org/r/55694/
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/8e85a070
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/8e85a070
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/8e85a070
Branch: refs/heads/master
Commit: 8e85a070d66b74543fddef62bbf826864c204ddc
Parents: fa38172
Author: Alex Clemmer <cl...@gmail.com>
Authored: Fri Jan 27 16:41:57 2017 -0800
Committer: Joseph Wu <jo...@apache.org>
Committed: Fri Jan 27 18:15:41 2017 -0800
----------------------------------------------------------------------
3rdparty/stout/cmake/StoutConfigure.cmake | 15 +++++++++------
3rdparty/stout/cmake/StoutTestsConfigure.cmake | 6 +++---
3rdparty/stout/tests/CMakeLists.txt | 3 ++-
3 files changed, 14 insertions(+), 10 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/8e85a070/3rdparty/stout/cmake/StoutConfigure.cmake
----------------------------------------------------------------------
diff --git a/3rdparty/stout/cmake/StoutConfigure.cmake b/3rdparty/stout/cmake/StoutConfigure.cmake
index b275546..32ce8c7 100644
--- a/3rdparty/stout/cmake/StoutConfigure.cmake
+++ b/3rdparty/stout/cmake/StoutConfigure.cmake
@@ -71,9 +71,8 @@ endif (WIN32)
# DEFINE THIRD-PARTY INCLUDE DIRECTORIES. Tells compiler toolchain where to get
# headers for our third party libs (e.g., -I/path/to/glog on Linux).
###############################################################################
-set(STOUT_INCLUDE_DIRS
- ${STOUT_INCLUDE_DIRS}
- ${STOUT_INCLUDE_DIR}
+set(STOUT_3RDPARTY_INCLUDE_DIRS
+ ${STOUT_3RDPARTY_INCLUDE_DIRS}
${APR_INCLUDE_DIR}
${BOOST_INCLUDE_DIR}
${ELFIO_INCLUDE_DIR}
@@ -82,17 +81,21 @@ set(STOUT_INCLUDE_DIRS
${PICOJSON_INCLUDE_DIR}
${PROTOBUF_INCLUDE_DIR}
${SVN_INCLUDE_DIR}
- src
)
if (WIN32)
- set(STOUT_INCLUDE_DIRS
- ${STOUT_INCLUDE_DIRS}
+ set(STOUT_3RDPARTY_INCLUDE_DIRS
+ ${STOUT_3RDPARTY_INCLUDE_DIRS}
${CURL_INCLUDE_DIR}
${ZLIB_INCLUDE_DIR}
)
endif (WIN32)
+set(STOUT_INCLUDE_DIRS
+ ${STOUT_INCLUDE_DIRS}
+ ${STOUT_INCLUDE_DIR}
+ )
+
# DEFINE THIRD-PARTY LIB INSTALL DIRECTORIES. Used to tell the compiler
# toolchain where to find our third party libs (e.g., -L/path/to/glog on
# Linux).
http://git-wip-us.apache.org/repos/asf/mesos/blob/8e85a070/3rdparty/stout/cmake/StoutTestsConfigure.cmake
----------------------------------------------------------------------
diff --git a/3rdparty/stout/cmake/StoutTestsConfigure.cmake b/3rdparty/stout/cmake/StoutTestsConfigure.cmake
index d3bd72e..685f1c8 100644
--- a/3rdparty/stout/cmake/StoutTestsConfigure.cmake
+++ b/3rdparty/stout/cmake/StoutTestsConfigure.cmake
@@ -77,9 +77,9 @@ set(STOUT_TEST_DEPENDENCIES
# DEFINE THIRD-PARTY INCLUDE DIRECTORIES. Tells compiler toolchain where to get
# headers for our third party libs (e.g., -I/path/to/glog on Linux)..
###############################################################################
-set(STOUT_TEST_INCLUDE_DIRS
- ${STOUT_TEST_INCLUDE_DIRS}
- ${STOUT_INCLUDE_DIRS}
+set(STOUT_TEST_3RDPARTY_INCLUDE_DIRS
+ ${STOUT_TEST_3RDPARTY_INCLUDE_DIRS}
+ ${STOUT_3RDPARTY_INCLUDE_DIRS}
${GMOCK_INCLUDE_DIR}
${GTEST_INCLUDE_DIR}
)
http://git-wip-us.apache.org/repos/asf/mesos/blob/8e85a070/3rdparty/stout/tests/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/3rdparty/stout/tests/CMakeLists.txt b/3rdparty/stout/tests/CMakeLists.txt
index 617be02..4e22bf6 100644
--- a/3rdparty/stout/tests/CMakeLists.txt
+++ b/3rdparty/stout/tests/CMakeLists.txt
@@ -96,7 +96,8 @@ set(STOUT_TESTS_SRC
# INCLUDE DIRECTIVES FOR STOUT TEST BINARY (generates, e.g., -I/path/to/thing
# on Linux).
#############################################################################
-include_directories(${STOUT_TEST_INCLUDE_DIRS})
+include_directories(SYSTEM ${STOUT_TEST_3RDPARTY_INCLUDE_DIRS})
+include_directories(${STOUT_INCLUDE_DIRS})
# LINKING LIBRARIES BY DIRECTORY (might generate, e.g., -L/path/to/thing on
# Linux).
[04/11] mesos git commit: CMake: Added `GroupSource` function to
automate IDE source grouping.
Posted by jo...@apache.org.
CMake: Added `GroupSource` function to automate IDE source grouping.
CMake allows users to declare groups of source files, which it uses to
(among other things) present source in a directory-like tree of files in
IDEs like XCode and Visual Studio.
Currently this is a manual process: we group the source in each folder
manually and declare it as a source group to CMake.
This commit will introduce a CMake macro that automates this process
away, providing control over many aspects, such as where the group tree
should be rooted, what the root should be named, and so on.
This macro indirectly partially addresses MESOS-3542, which will help us
to separate out Mesos builds into many libraries, rather than one
single, monolithic libmesos.
Review: https://reviews.apache.org/r/55599/
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/8b31bd2b
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/8b31bd2b
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/8b31bd2b
Branch: refs/heads/master
Commit: 8b31bd2b075dce94a10f6067f517fcbcb88a40ea
Parents: 23e0ec2
Author: Alex Clemmer <cl...@gmail.com>
Authored: Thu Jan 26 14:05:53 2017 -0800
Committer: Joseph Wu <jo...@apache.org>
Committed: Fri Jan 27 18:15:41 2017 -0800
----------------------------------------------------------------------
3rdparty/stout/cmake/GroupSource.cmake | 104 ++++++++++++++++++++++++++++
1 file changed, 104 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/8b31bd2b/3rdparty/stout/cmake/GroupSource.cmake
----------------------------------------------------------------------
diff --git a/3rdparty/stout/cmake/GroupSource.cmake b/3rdparty/stout/cmake/GroupSource.cmake
new file mode 100644
index 0000000..3cf6a90
--- /dev/null
+++ b/3rdparty/stout/cmake/GroupSource.cmake
@@ -0,0 +1,104 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+###############################################################
+# GROUP_SOURCE takes a directory root and recursively groups source files by
+# folder, so they can be displayed hierarchically in IDEs such as XCode or
+# Visual Studio. NOTE: Source files are only displayed if they are added for
+# compilation. If a file is not compiled, it will not show up in the IDE.
+#
+# Parameters:
+# GROUP_NAME Specifies group name of this directory tree. For example,
+# the directory tree `src/slave/` would fall under the group
+# name "Agent Source Files".
+# ROOT_DIRECTORY Root of the directory tree to generate source groups for.
+# RELATIVE_TO Directory to create source group tree relative to. For
+# example, if you want to the code in `src/slave` to show up
+# in the directory tree under a folder called `slave/` (i.e.,
+# omitting the `src/` component), then you would provite a
+# ROOT_DIRECTORY `src/slave` RELATIVE_TO `slave/`.
+# SOURCE_PATTERN Pattern (glob) of source files to match (e.g, *.cpp).
+function(GROUP_SOURCE GROUP_NAME ROOT_DIRECTORY RELATIVE_TO SOURCE_PATTERN)
+ file(
+ GLOB_RECURSE
+ SOURCE_FILES
+ RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}"
+ "${ROOT_DIRECTORY}/${SOURCE_PATTERN}"
+ )
+
+ # Extremely inefficient method of recursively creating a source group for
+ # every subdirectory that contains a source file. In other words, if we have
+ # a folder structure like `slave/containerizer/`, we want a source group for
+ # both `slave/` and `slave/containerizer/`, so that the IDE structures the
+ # source tree hierarchically. This loop is so inefficient because CMake does
+ # not support a set data structure, it is hard to do better than this and
+ # still be cross-platform.
+ #
+ # The way this loop functions is to:
+ # (1) Loop over every source file found in any subdirectory rooted at
+ # `ROOT_DIRECTORY`
+ # (2) For each source file, obtain the directory it exists in. For example if
+ # the source file is `slave/containerizer/containerizer.cpp`, then the
+ # directory `slave/containerizer/`.
+ # (3) Create a source group for the directory. The source group for the
+ # directory consists of any file that is in the directory, not including
+ # files that are in subdirectories. In the example above, this would be
+ # something like `slave/containerizer/*.cpp`.
+ #
+ # NOTE: This operation is so inefficient because it occurs for every
+ # source file, rather than every unique directory. So, every time we
+ # encounter a source file in any directory, we will add a source group
+ # for its source directory.
+ #
+ # NOTE: This operation will also add every source file to the source
+ # group, but only the source files that both appear in this source group,
+ # and which users actually pass to the target for compilation will appear
+ # in the IDE's source group.
+ foreach (SOURCE_FILE ${SOURCE_FILES})
+ # Get relative directory of source file, use to generate a source group
+ # that resembles the directory tree.
+ get_filename_component(SOURCE_FILE_REALPATH ${SOURCE_FILE} REALPATH)
+ file(RELATIVE_PATH SOURCE_FILE_RELATIVE ${RELATIVE_TO}
+ ${SOURCE_FILE_REALPATH})
+ get_filename_component(SOURCE_DIRECTORY_RELATIVE ${SOURCE_FILE_RELATIVE}
+ DIRECTORY)
+ set(SOURCE_GROUP "${GROUP_NAME}\\${SOURCE_DIRECTORY_RELATIVE}")
+
+ # This is necessary because source group names require '\' rather than '/'
+ # as separators, in order to make a hierarchical source tree. This is
+ # primarily because the source group construct was originally designed for
+ # Visual Studio projects.
+ string(REGEX REPLACE "/" "\\\\" SOURCE_GROUP ${SOURCE_GROUP})
+
+ # Get all files in `SOURCE_DIRECTORY`, and create a source group for it.
+ # NOTE: It is important concatinate `SOURCE_FILE` with the relative-to root
+ # we passed to `file` above; if we don't, we will get an empty string when
+ # `RELATIVE_TO` is the same as the current source directory, which in turn
+ # will cause the call to `file` below to return no source files.
+ get_filename_component(
+ SOURCE_DIRECTORY
+ "${CMAKE_CURRENT_SOURCE_DIR}/${SOURCE_FILE}"
+ DIRECTORY)
+ file(
+ GLOB
+ SOURCE_GROUP_FILES
+ RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}"
+ "${SOURCE_DIRECTORY}/${SOURCE_PATTERN}"
+ )
+
+ source_group(${SOURCE_GROUP} FILES ${SOURCE_GROUP_FILES})
+ endforeach (SOURCE_FILE)
+endfunction(GROUP_SOURCE)
[03/11] mesos git commit: CMake: Added `tests` target.
Posted by jo...@apache.org.
CMake: Added `tests` target.
This commit will introduce a "tests" target to the CMake build system.
The semantics of this target are very similar to the autotools build
target "tests", in that they build the tests, but do not run them.
Review: https://reviews.apache.org/r/55637/
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/fa381729
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/fa381729
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/fa381729
Branch: refs/heads/master
Commit: fa38172942c8bb6e310c33db6e541f003c219491
Parents: 9b62f1f
Author: Alex Clemmer <cl...@gmail.com>
Authored: Fri Jan 27 16:33:54 2017 -0800
Committer: Joseph Wu <jo...@apache.org>
Committed: Fri Jan 27 18:15:41 2017 -0800
----------------------------------------------------------------------
CMakeLists.txt | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/fa381729/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c6b1eb6..7f4b5d0 100755
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -68,5 +68,10 @@ add_custom_target(
check ${STOUT_TESTS_TARGET}
COMMAND ${PROCESS_TESTS_TARGET}
COMMAND ${MESOS_TESTS_TARGET}
- DEPENDS ${STOUT_TESTS_TARGET} ${PROCESS_TESTS_TARGET} ${MESOS_TESTS_TARGET}
+ DEPENDS ${STOUT_TESTS_TARGET} ${PROCESS_TESTS_TARGET} ${MESOS_TESTS_TARGET}
+ )
+
+add_custom_target(
+ tests
+ DEPENDS ${STOUT_TESTS_TARGET} ${PROCESS_TESTS_TARGET} ${MESOS_TESTS_TARGET}
)
[07/11] mesos git commit: CMake: Marked 3rdparty headers as "system"
headers.
Posted by jo...@apache.org.
CMake: Marked 3rdparty headers as "system" headers.
Because we pull in and build against 3rdparty libraries, we also pull
in the warnings from these 3rdparty libraries. In most cases, these
warnings can only be addressed by updating the 3rdparty source.
Trivial warnings can be eliminated simply by marking 3rdparty
libraries as `SYSTEM` headers when we specify the include path.
This commit will thus separate out the headers of Mesos' 3rdparty
libraries from the Mesos headers, and include them as
`SYSTEM` headers.
Notably, we choose to include Stout's and Libprocess's headers as
third-party system headers, since the goal is for them to be completely
independent projects.
Review: https://reviews.apache.org/r/55696/
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/15b4caed
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/15b4caed
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/15b4caed
Branch: refs/heads/master
Commit: 15b4caeda4e945d48220319319d95a65c24d868f
Parents: 61aca19
Author: Alex Clemmer <cl...@gmail.com>
Authored: Fri Jan 27 16:52:08 2017 -0800
Committer: Joseph Wu <jo...@apache.org>
Committed: Fri Jan 27 18:15:41 2017 -0800
----------------------------------------------------------------------
src/CMakeLists.txt | 1 +
src/docker/CMakeLists.txt | 1 +
src/master/CMakeLists.txt | 1 +
src/master/cmake/MasterConfigure.cmake | 4 ++++
src/slave/CMakeLists.txt | 1 +
src/slave/cmake/AgentConfigure.cmake | 4 ++++
src/tests/CMakeLists.txt | 1 +
src/tests/cmake/MesosTestsConfigure.cmake | 5 +++++
8 files changed, 18 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/15b4caed/src/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 348eb2c..09ef1ae 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -483,6 +483,7 @@ endif (WIN32)
# INCLUDE DIRECTIVES FOR MESOS LIBRARY (generates, e.g., -I/path/to/thing
# on Linux).
#########################################################################
+include_directories(SYSTEM ${AGENT_3RDPARTY_INCLUDE_DIRS})
include_directories(${AGENT_INCLUDE_DIRS})
# Generate all binaries in the same folder.
http://git-wip-us.apache.org/repos/asf/mesos/blob/15b4caed/src/docker/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/src/docker/CMakeLists.txt b/src/docker/CMakeLists.txt
index 892370d..2d7c30d 100644
--- a/src/docker/CMakeLists.txt
+++ b/src/docker/CMakeLists.txt
@@ -25,6 +25,7 @@ set(DOCKER_EXECUTOR_SRC
# INCLUDE DIRECTIVES FOR DOCKER EXECUTOR EXECUTABLE (generates, e.g.,
# -I/path/to/thing on Linux).
#####################################################################
+include_directories(SYSTEM ${AGENT_3RDPARTY_INCLUDE_DIRS})
include_directories(${AGENT_INCLUDE_DIRS})
# LINKING LIBRARIES BY DIRECTORY (might generate, e.g., -L/path/to/thing on
http://git-wip-us.apache.org/repos/asf/mesos/blob/15b4caed/src/master/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/src/master/CMakeLists.txt b/src/master/CMakeLists.txt
index a9fb34f..92a1af8 100644
--- a/src/master/CMakeLists.txt
+++ b/src/master/CMakeLists.txt
@@ -27,6 +27,7 @@ set(MASTER_EXECUTABLE_SRC
# INCLUDE DIRECTIVES FOR MASTER EXECUTABLE (generates, e.g., -I/path/to/thing
# on Linux).
############################################################################
+include_directories(SYSTEM ${MASTER_3RDPARTY_INCLUDE_DIRS})
include_directories(${MASTER_INCLUDE_DIRS})
# LINKING LIBRARIES BY DIRECTORY (might generate, e.g., -L/path/to/thing on
http://git-wip-us.apache.org/repos/asf/mesos/blob/15b4caed/src/master/cmake/MasterConfigure.cmake
----------------------------------------------------------------------
diff --git a/src/master/cmake/MasterConfigure.cmake b/src/master/cmake/MasterConfigure.cmake
index 3d316d6..66a5080 100644
--- a/src/master/cmake/MasterConfigure.cmake
+++ b/src/master/cmake/MasterConfigure.cmake
@@ -40,8 +40,12 @@ set(MASTER_INCLUDE_DIRS
${MESOS_BIN_INCLUDE_DIR}/mesos
${MESOS_BIN_SRC_DIR}
${MESOS_SRC_DIR}
+ )
+set(MASTER_3RDPARTY_INCLUDE_DIRS
+ ${MASTER_3RDPARTY_INCLUDE_DIRS}
${PROCESS_INCLUDE_DIRS}
+ ${PROCESS_3RDPARTY_INCLUDE_DIRS}
${ZOOKEEPER_INCLUDE_DIR}
${ZOOKEEPER_INCLUDE_GENDIR}
${LEVELDB_INCLUDE_DIR}
http://git-wip-us.apache.org/repos/asf/mesos/blob/15b4caed/src/slave/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/src/slave/CMakeLists.txt b/src/slave/CMakeLists.txt
index 03466bd..9dbadca 100644
--- a/src/slave/CMakeLists.txt
+++ b/src/slave/CMakeLists.txt
@@ -28,6 +28,7 @@ add_subdirectory(resource_estimators)
# INCLUDE DIRECTIVES FOR AGENT EXECUTABLE (generates, e.g., -I/path/to/thing
# on Linux).
############################################################################
+include_directories(SYSTEM ${AGENT_3RDPARTY_INCLUDE_DIRS})
include_directories(${AGENT_INCLUDE_DIRS})
# LINKING LIBRARIES BY DIRECTORY (might generate, e.g., -L/path/to/thing on
http://git-wip-us.apache.org/repos/asf/mesos/blob/15b4caed/src/slave/cmake/AgentConfigure.cmake
----------------------------------------------------------------------
diff --git a/src/slave/cmake/AgentConfigure.cmake b/src/slave/cmake/AgentConfigure.cmake
index 1582127..93d6fed 100644
--- a/src/slave/cmake/AgentConfigure.cmake
+++ b/src/slave/cmake/AgentConfigure.cmake
@@ -56,8 +56,12 @@ set(AGENT_INCLUDE_DIRS
${MESOS_BIN_INCLUDE_DIR}/mesos
${MESOS_BIN_SRC_DIR}
${MESOS_SRC_DIR}
+ )
+set(AGENT_3RDPARTY_INCLUDE_DIRS
+ ${AGENT_3RDPARTY_INCLUDE_DIRS}
${PROCESS_INCLUDE_DIRS}
+ ${PROCESS_3RDPARTY_INCLUDE_DIRS}
${ZOOKEEPER_INCLUDE_DIR}
${ZOOKEEPER_INCLUDE_GENDIR}
${LEVELDB_INCLUDE_DIR}
http://git-wip-us.apache.org/repos/asf/mesos/blob/15b4caed/src/tests/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/src/tests/CMakeLists.txt b/src/tests/CMakeLists.txt
index 56ba671..6e6ecb1 100644
--- a/src/tests/CMakeLists.txt
+++ b/src/tests/CMakeLists.txt
@@ -225,6 +225,7 @@ endif (LINUX)
# INCLUDE DIRECTIVES (generates, e.g., -I/path/to/thing on Linux).
##################################################################
+include_directories(SYSTEM ${MESOS_3RDPARTY_TESTS_INCLUDE_DIRS})
include_directories(${MESOS_TESTS_INCLUDE_DIRS})
# LINKING LIBRARIES (might generate, e.g., -L/path/to/thing on Linux).
http://git-wip-us.apache.org/repos/asf/mesos/blob/15b4caed/src/tests/cmake/MesosTestsConfigure.cmake
----------------------------------------------------------------------
diff --git a/src/tests/cmake/MesosTestsConfigure.cmake b/src/tests/cmake/MesosTestsConfigure.cmake
index 8d41638..62e2741 100644
--- a/src/tests/cmake/MesosTestsConfigure.cmake
+++ b/src/tests/cmake/MesosTestsConfigure.cmake
@@ -61,6 +61,11 @@ set(MESOS_TESTS_DEPENDENCIES
set(MESOS_TESTS_INCLUDE_DIRS
${MESOS_TESTS_INCLUDE_DIRS}
${AGENT_INCLUDE_DIRS}
+ )
+
+set(MESOS_3RDPARTY_TESTS_INCLUDE_DIRS
+ ${MESOS_3RDPARTY_TESTS_INCLUDE_DIRS}
+ ${AGENT_3RDPARTY_INCLUDE_DIRS}
${GMOCK_INCLUDE_DIR}
${GTEST_INCLUDE_DIR}
)
[05/11] mesos git commit: CMake: Transitioned Stout to automatic
source grouping.
Posted by jo...@apache.org.
CMake: Transitioned Stout to automatic source grouping.
Stout currently manually groups its source code by folder in order to
present the source nicely in IDEs like XCode and Visual Studio.
With the recently-introduced CMake function, `GROUP_SOURCE`, this
process is automated away. This commit will remove these manual groups
and replace it with a call to this function.
Review: https://reviews.apache.org/r/55600/
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/7cd8c6a8
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/7cd8c6a8
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/7cd8c6a8
Branch: refs/heads/master
Commit: 7cd8c6a8589d1dab31752f178b625ccec311a436
Parents: 8b31bd2
Author: Alex Clemmer <cl...@gmail.com>
Authored: Thu Jan 26 14:12:16 2017 -0800
Committer: Joseph Wu <jo...@apache.org>
Committed: Fri Jan 27 18:15:41 2017 -0800
----------------------------------------------------------------------
3rdparty/stout/cmake/StoutConfigure.cmake | 37 +++++---------------------
3rdparty/stout/tests/CMakeLists.txt | 9 ++++---
2 files changed, 13 insertions(+), 33 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/7cd8c6a8/3rdparty/stout/cmake/StoutConfigure.cmake
----------------------------------------------------------------------
diff --git a/3rdparty/stout/cmake/StoutConfigure.cmake b/3rdparty/stout/cmake/StoutConfigure.cmake
index bc27ac6..b275546 100644
--- a/3rdparty/stout/cmake/StoutConfigure.cmake
+++ b/3rdparty/stout/cmake/StoutConfigure.cmake
@@ -27,6 +27,8 @@ if (NOT WIN32)
find_package(Svn REQUIRED)
endif (NOT WIN32)
+include(GroupSource)
+
# SOURCE GROUPS. Allows IDEs to group header files for projects taking a
# dependency on this package.
########################################################################
@@ -38,36 +40,11 @@ file(
)
macro(GROUP_STOUT_HEADERS)
- source_group(
- "Stout Headers"
- REGULAR_EXPRESSION "${STOUT_INCLUDE_DIR}/stout/.*\\.hpp")
- source_group(
- "Stout Headers\\flags"
- REGULAR_EXPRESSION "${STOUT_INCLUDE_DIR}/stout/flags/.*\\.hpp")
- source_group(
- "Stout Headers\\internal\\windows"
- REGULAR_EXPRESSION "${STOUT_INCLUDE_DIR}/stout/internal/windows/.*\\.hpp")
- source_group(
- "Stout Headers\\os"
- REGULAR_EXPRESSION "${STOUT_INCLUDE_DIR}/stout/os/.*\\.hpp")
- source_group(
- "Stout Headers\\os\\posix"
- REGULAR_EXPRESSION "${STOUT_INCLUDE_DIR}/stout/os/posix/.*\\.hpp")
- source_group(
- "Stout Headers\\os\\raw"
- REGULAR_EXPRESSION "${STOUT_INCLUDE_DIR}/stout/os/raw/.*\\.hpp")
- source_group(
- "Stout Headers\\os\\windows"
- REGULAR_EXPRESSION "${STOUT_INCLUDE_DIR}/stout/os/windows/.*\\.hpp")
- source_group(
- "Stout Headers\\posix"
- REGULAR_EXPRESSION "${STOUT_INCLUDE_DIR}/stout/posix/.*\\.hpp")
- source_group(
- "Stout Headers\\tests"
- REGULAR_EXPRESSION "${STOUT_INCLUDE_DIR}/stout/tests/.*\\.hpp")
- source_group(
- "Stout Headers\\windows"
- REGULAR_EXPRESSION "${STOUT_INCLUDE_DIR}/stout/windows/.*\\.hpp")
+ GROUP_SOURCE(
+ "Stout Public Headers"
+ "${STOUT_INCLUDE_DIR}/stout"
+ "${STOUT_INCLUDE_DIR}/stout"
+ "*.h*")
endmacro(GROUP_STOUT_HEADERS)
# DEFINE PROCESS LIBRARY DEPENDENCIES. Tells the process library build targets
http://git-wip-us.apache.org/repos/asf/mesos/blob/7cd8c6a8/3rdparty/stout/tests/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/3rdparty/stout/tests/CMakeLists.txt b/3rdparty/stout/tests/CMakeLists.txt
index a8a3ac7..617be02 100644
--- a/3rdparty/stout/tests/CMakeLists.txt
+++ b/3rdparty/stout/tests/CMakeLists.txt
@@ -107,11 +107,14 @@ link_directories(${STOUT_TEST_LIB_DIRS})
###########################################################################
add_executable(${STOUT_TESTS_TARGET} ${STOUT_TESTS_SRC})
-source_group("tests" FILES ${STOUT_ROOT_TESTS_SRC})
-source_group("tests\\os" FILES ${STOUT_OS_TESTS_SRC})
-
GROUP_STOUT_HEADERS()
+GROUP_SOURCE(
+ "tests"
+ "${CMAKE_CURRENT_SOURCE_DIR}"
+ "${CMAKE_CURRENT_SOURCE_DIR}"
+ "*.[ch]*")
+
# ADD LINKER FLAGS (generates, e.g., -lglog on Linux).
######################################################
target_link_libraries(${STOUT_TESTS_TARGET} ${STOUT_TEST_LIBS})
[08/11] mesos git commit: CMake: Marked 3rdparty headers as "system"
headers.
Posted by jo...@apache.org.
CMake: Marked 3rdparty headers as "system" headers.
Because we pull in and build against 3rdparty libraries, we also pull
in the warnings from these 3rdparty libraries. In most cases, these
warnings can only be addressed by updating the 3rdparty source.
Trivial warnings can be eliminated simply by marking 3rdparty
libraries as `SYSTEM` headers when we specify the include path.
This commit will thus separate out the headers of libprocess's 3rdparty
libraries from the libprocess API headers, and include them as
`SYSTEM` headers.
Notably, we choose to include Stout's headers as third-party system
headers, since the goal is for them to be completely independent
projects.
Review: https://reviews.apache.org/r/55695/
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/61aca191
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/61aca191
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/61aca191
Branch: refs/heads/master
Commit: 61aca1914111b6d024185f2b45756e86baf1d661
Parents: 8e85a07
Author: Alex Clemmer <cl...@gmail.com>
Authored: Fri Jan 27 16:47:58 2017 -0800
Committer: Joseph Wu <jo...@apache.org>
Committed: Fri Jan 27 18:15:41 2017 -0800
----------------------------------------------------------------------
.../libprocess/cmake/ProcessConfigure.cmake | 23 +++++++++++++++-----
.../cmake/ProcessTestsConfigure.cmake | 9 ++++++--
3rdparty/libprocess/src/CMakeLists.txt | 1 +
3 files changed, 25 insertions(+), 8 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/61aca191/3rdparty/libprocess/cmake/ProcessConfigure.cmake
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/cmake/ProcessConfigure.cmake b/3rdparty/libprocess/cmake/ProcessConfigure.cmake
index 2e695b5..c15b0a6 100755
--- a/3rdparty/libprocess/cmake/ProcessConfigure.cmake
+++ b/3rdparty/libprocess/cmake/ProcessConfigure.cmake
@@ -88,24 +88,35 @@ endif (WIN32)
###############################################################################
set(PROCESS_INCLUDE_DIRS
${PROCESS_INCLUDE_DIRS}
- ${STOUT_INCLUDE_DIRS}
${PROCESS_INCLUDE_DIR}
+ )
+
+set(PROCESS_3RDPARTY_INCLUDE_DIRS
+ ${PROCESS_3RDPARTY_INCLUDE_DIRS}
+ ${STOUT_3RDPARTY_INCLUDE_DIRS}
+ ${STOUT_INCLUDE_DIRS}
${HTTP_PARSER_INCLUDE_DIR}
)
if (NOT ENABLE_LIBEVENT)
- set(PROCESS_INCLUDE_DIRS ${PROCESS_INCLUDE_DIRS} ${LIBEV_INCLUDE_DIR})
+ set(PROCESS_3RDPARTY_INCLUDE_DIRS
+ ${PROCESS_3RDPARTY_INCLUDE_DIRS}
+ ${LIBEV_INCLUDE_DIR}
+ )
elseif (ENABLE_LIBEVENT)
- set(PROCESS_INCLUDE_DIRS ${PROCESS_INCLUDE_DIRS} ${LIBEVENT_INCLUDE_DIR})
+ set(PROCESS_3RDPARTY_INCLUDE_DIRS
+ ${PROCESS_3RDPARTY_INCLUDE_DIRS}
+ ${LIBEVENT_INCLUDE_DIR}
+ )
endif (NOT ENABLE_LIBEVENT)
if (HAS_GPERFTOOLS)
- set(PROCESS_INCLUDE_DIRS ${PROCESS_INCLUDE_DIRS} ${GPERFTOOLS_INCLUDE_DIR})
+ set(PROCESS_3RDPARTY_INCLUDE_DIRS ${PROCESS_3RDPARTY_INCLUDE_DIRS} ${GPERFTOOLS_INCLUDE_DIR})
endif (HAS_GPERFTOOLS)
if (WIN32)
- set(PROCESS_INCLUDE_DIRS
- ${PROCESS_INCLUDE_DIRS}
+ set(PROCESS_3RDPARTY_INCLUDE_DIRS
+ ${PROCESS_3RDPARTY_INCLUDE_DIRS}
${ZLIB_INCLUDE_DIR}
)
endif (WIN32)
http://git-wip-us.apache.org/repos/asf/mesos/blob/61aca191/3rdparty/libprocess/cmake/ProcessTestsConfigure.cmake
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/cmake/ProcessTestsConfigure.cmake b/3rdparty/libprocess/cmake/ProcessTestsConfigure.cmake
index 49ad836..31e20e4 100644
--- a/3rdparty/libprocess/cmake/ProcessTestsConfigure.cmake
+++ b/3rdparty/libprocess/cmake/ProcessTestsConfigure.cmake
@@ -36,13 +36,18 @@ set(PROCESS_TEST_DEPENDENCIES
###############################################################################
set(PROCESS_TEST_INCLUDE_DIRS
${PROCESS_TEST_INCLUDE_DIRS}
- ../ # includes, e.g., decoder.hpp
- ${PROCESS_INCLUDE_DIRS}
+ ${PROCESS_3RDPARTY_INCLUDE_DIRS}
${GMOCK_INCLUDE_DIR}
${GTEST_INCLUDE_DIR}
src
)
+set(PROCESS_TEST_INCLUDE_DIRS
+ ${PROCESS_TEST_INCLUDE_DIRS}
+ ${PROCESS_INCLUDE_DIRS}
+ ../ # includes, e.g., decoder.hpp
+ )
+
# DEFINE THIRD-PARTY LIB INSTALL DIRECTORIES. Used to tell the compiler
# toolchain where to find our third party libs (e.g., -L/path/to/glog on
# Linux).
http://git-wip-us.apache.org/repos/asf/mesos/blob/61aca191/3rdparty/libprocess/src/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/src/CMakeLists.txt b/3rdparty/libprocess/src/CMakeLists.txt
index d17cf9d..ab362aa 100644
--- a/3rdparty/libprocess/src/CMakeLists.txt
+++ b/3rdparty/libprocess/src/CMakeLists.txt
@@ -79,6 +79,7 @@ endif (ENABLE_LIBEVENT)
# INCLUDE DIRECTIVES FOR PROCESS LIBRARY (generates, e.g., -I/path/to/thing
# on Linux).
###########################################################################
+include_directories(SYSTEM ${PROCESS_3RDPARTY_INCLUDE_DIRS})
include_directories(${PROCESS_INCLUDE_DIRS})
# LINKING LIBRARIES BY DIRECTORY (might generate, e.g., -L/path/to/thing on
[09/11] mesos git commit: CMake: Added configuration of test scripts
in the bin/ directory.
Posted by jo...@apache.org.
CMake: Added configuration of test scripts in the bin/ directory.
This adds some helper script templates to the CMake build.
These include simple bash wrappers like `bin/mesos-master.sh`
and similar wrappers which can be found in the autotools build.
Review: https://reviews.apache.org/r/55607/
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/9b62f1fc
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/9b62f1fc
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/9b62f1fc
Branch: refs/heads/master
Commit: 9b62f1fc06506290c09d1c53fe691e67430db0f8
Parents: 8bbfa51
Author: Alex Clemmer <cl...@gmail.com>
Authored: Fri Jan 27 15:00:37 2017 -0800
Committer: Joseph Wu <jo...@apache.org>
Committed: Fri Jan 27 18:15:41 2017 -0800
----------------------------------------------------------------------
cmake/MesosConfigure.cmake | 41 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 41 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/9b62f1fc/cmake/MesosConfigure.cmake
----------------------------------------------------------------------
diff --git a/cmake/MesosConfigure.cmake b/cmake/MesosConfigure.cmake
index ce127e1..e44f662 100755
--- a/cmake/MesosConfigure.cmake
+++ b/cmake/MesosConfigure.cmake
@@ -178,3 +178,44 @@ set(MESOS_LIBS_TARGET mesos-${MESOS_PACKAGE_VERSION}
set(MESOS_PROTOBUF_TARGET mesos-protobufs
CACHE STRING "Library of protobuf definitions used by Mesos")
+
+# MESOS SCRIPT CONFIGURATION.
+#############################
+if (NOT WIN32)
+ # Create build bin/ directory. We will place configured scripts here.
+ file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
+ file(MAKE_DIRECTORY "${CMAKE_BINARY_DIR}/bin/tmp")
+
+ # Define the variables required to configure these scripts.
+ set(abs_top_srcdir "${CMAKE_SOURCE_DIR}")
+ set(abs_top_builddir "${CMAKE_BINARY_DIR}")
+ set(VERSION "${PACKAGE_VERSION}")
+
+ # Find all scripts to configure. The scripts are in the bin/ directory, and
+ # end with the `.in` suffix. For example `mesos.sh.in`.
+ file(GLOB_RECURSE BIN_FILES "${CMAKE_SOURCE_DIR}/bin/*.in")
+ foreach (BIN_FILE ${BIN_FILES})
+ # Strip the `.in` suffix off. This will be the script's name in the build
+ # bin/ directory. For example, `mesos.sh.in` -> `mesos.sh`.
+ string(REGEX MATCH "(.*).in$" MATCH ${BIN_FILE})
+ get_filename_component(OUTPUT_BIN_FILE "${CMAKE_MATCH_1}" NAME)
+
+ # Configure. Because CMake does not support configuring and setting
+ # permissions, we do this in a two-step process: we first configure the
+ # file, placing the configured file in a temporary directory, and then we
+ # "copy" the configured file to the build `bin` directory, setting the
+ # permissions as we go.
+ #
+ # NOTE: We use the `@ONLY` argument here to avoid trying to substitute
+ # the value of `${@}`, which we frequently use in the scripts.
+ configure_file(
+ ${BIN_FILE}
+ "${CMAKE_BINARY_DIR}/bin/tmp/${OUTPUT_BIN_FILE}"
+ @ONLY)
+
+ file(COPY "${CMAKE_BINARY_DIR}/bin/tmp/${OUTPUT_BIN_FILE}"
+ DESTINATION "${CMAKE_BINARY_DIR}/bin"
+ FILE_PERMISSIONS WORLD_EXECUTE OWNER_READ OWNER_WRITE)
+ endforeach (BIN_FILE)
+ file(REMOVE_RECURSE "${CMAKE_BINARY_DIR}/bin/tmp")
+endif (NOT WIN32)
[06/11] mesos git commit: CMake: Added source groups for libprocess.
Posted by jo...@apache.org.
CMake: Added source groups for libprocess.
This uses the recently-introduced CMake function, `GROUP_SOURCE`, to
automatically group libprocess sources. This makes sources appear
in a sensible directory structure in certain supported IDE's.
Review: https://reviews.apache.org/r/55604/
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/8bbfa510
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/8bbfa510
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/8bbfa510
Branch: refs/heads/master
Commit: 8bbfa5108ba4e5d2fe1b584bd8103274bc6631fc
Parents: 7cd8c6a
Author: Alex Clemmer <cl...@gmail.com>
Authored: Fri Jan 27 12:21:33 2017 -0800
Committer: Joseph Wu <jo...@apache.org>
Committed: Fri Jan 27 18:15:41 2017 -0800
----------------------------------------------------------------------
3rdparty/libprocess/cmake/ProcessConfigure.cmake | 17 +++++++++++++++++
3rdparty/libprocess/src/CMakeLists.txt | 9 +++++++++
3rdparty/libprocess/src/tests/CMakeLists.txt | 9 +++++++++
3 files changed, 35 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/8bbfa510/3rdparty/libprocess/cmake/ProcessConfigure.cmake
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/cmake/ProcessConfigure.cmake b/3rdparty/libprocess/cmake/ProcessConfigure.cmake
index 873f41d..2e695b5 100755
--- a/3rdparty/libprocess/cmake/ProcessConfigure.cmake
+++ b/3rdparty/libprocess/cmake/ProcessConfigure.cmake
@@ -44,6 +44,23 @@ set(PROCESS_PACKAGE_VERSION 0.0.1)
set(PROCESS_PACKAGE_SOVERSION 0)
set(PROCESS_TARGET process-${PROCESS_PACKAGE_VERSION})
+# SOURCE GROUPS. Allows IDEs to group header files for projects taking a
+# dependency on this package.
+########################################################################
+file(
+ GLOB_RECURSE
+ PROCESS_HEADERS
+ "${PROCESS_INCLUDE_DIR}/process/*.hpp"
+ )
+
+macro(GROUP_PROCESS_HEADERS)
+ GROUP_SOURCE(
+ "Libprocess Public Headers"
+ "${PROCESS_INCLUDE_DIR}/process"
+ "${PROCESS_INCLUDE_DIR}/process"
+ "*.h*")
+endmacro(GROUP_PROCESS_HEADERS)
+
# Define process library dependencies. Tells the process library build targets
# download/configure/build all third-party libraries before attempting to build.
################################################################################
http://git-wip-us.apache.org/repos/asf/mesos/blob/8bbfa510/3rdparty/libprocess/src/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/src/CMakeLists.txt b/3rdparty/libprocess/src/CMakeLists.txt
index 60f0e76..d17cf9d 100644
--- a/3rdparty/libprocess/src/CMakeLists.txt
+++ b/3rdparty/libprocess/src/CMakeLists.txt
@@ -99,6 +99,15 @@ else (WIN32)
)
endif (WIN32)
+GROUP_STOUT_HEADERS()
+GROUP_PROCESS_HEADERS()
+
+GROUP_SOURCE(
+ "src"
+ "${CMAKE_CURRENT_SOURCE_DIR}"
+ "${CMAKE_CURRENT_SOURCE_DIR}"
+ "*.[ch]*")
+
set_target_properties(
${PROCESS_TARGET} PROPERTIES
VERSION ${PROCESS_PACKAGE_VERSION}
http://git-wip-us.apache.org/repos/asf/mesos/blob/8bbfa510/3rdparty/libprocess/src/tests/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/src/tests/CMakeLists.txt b/3rdparty/libprocess/src/tests/CMakeLists.txt
index 0b2660c..b298bbe 100644
--- a/3rdparty/libprocess/src/tests/CMakeLists.txt
+++ b/3rdparty/libprocess/src/tests/CMakeLists.txt
@@ -68,6 +68,15 @@ link_directories(${PROCESS_TEST_LIB_DIRS})
###############################################################################
add_executable(${PROCESS_TESTS_TARGET} ${PROCESS_TESTS_SRC})
+GROUP_STOUT_HEADERS()
+GROUP_PROCESS_HEADERS()
+
+GROUP_SOURCE(
+ "tests"
+ "${CMAKE_CURRENT_SOURCE_DIR}"
+ "${CMAKE_CURRENT_SOURCE_DIR}"
+ "*.[ch]*")
+
# ADD LINKER FLAGS (generates, e.g., -lglog on Linux).
######################################################
target_link_libraries(${PROCESS_TESTS_TARGET} ${PROCESS_TEST_LIBS})
[11/11] mesos git commit: Fixed test build on OSX.
Posted by jo...@apache.org.
Fixed test build on OSX.
A refactoring in https://reviews.apache.org/r/53790/
moved the implementation of `LinuxRootFs` into a `.cpp` file,
built only on Linux. A single health_check_test and the
`volume_image_isolator_tests` used to pull in this symbol
via the `DockerArchive` object.
This commit moves the `rootfs.cpp` file into a Linux-guarded
section in the autotools build; moves `volume_image_isolator_tests`
into a Linux-guarded section in both builds; and #ifdef's the
`HealthCheckTest.ROOT_HealthyTaskWithContainerImage` test.
Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/2d0195ee
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/2d0195ee
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/2d0195ee
Branch: refs/heads/master
Commit: 2d0195eed54feac41485fb1503dc4004e5500c81
Parents: 5b8b907
Author: Joseph Wu <jo...@apache.org>
Authored: Fri Jan 27 17:51:35 2017 -0800
Committer: Joseph Wu <jo...@apache.org>
Committed: Fri Jan 27 18:15:42 2017 -0800
----------------------------------------------------------------------
src/Makefile.am | 6 +++---
src/tests/CMakeLists.txt | 2 +-
src/tests/health_check_tests.cpp | 2 ++
3 files changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/mesos/blob/2d0195ee/src/Makefile.am
----------------------------------------------------------------------
diff --git a/src/Makefile.am b/src/Makefile.am
index 1382299..6c9be54 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -2298,8 +2298,6 @@ mesos_tests_SOURCES = \
tests/containerizer/provisioner_backend_tests.cpp \
tests/containerizer/provisioner_docker_tests.cpp \
tests/containerizer/provisioner_paths_tests.cpp \
- tests/containerizer/rootfs.cpp \
- tests/containerizer/volume_image_isolator_tests.cpp \
tests/containerizer/volume_sandbox_path_isolator_tests.cpp
if ENABLE_XFS_DISK_ISOLATOR
@@ -2348,9 +2346,11 @@ mesos_tests_SOURCES += \
tests/containerizer/ns_tests.cpp \
tests/containerizer/nvidia_gpu_isolator_tests.cpp \
tests/containerizer/perf_tests.cpp \
+ tests/containerizer/rootfs.cpp \
tests/containerizer/runtime_isolator_tests.cpp \
tests/containerizer/sched_tests.cpp \
- tests/containerizer/setns_test_helper.cpp
+ tests/containerizer/setns_test_helper.cpp \
+ tests/containerizer/volume_image_isolator_tests.cpp
endif
if WITH_NETWORK_ISOLATOR
http://git-wip-us.apache.org/repos/asf/mesos/blob/2d0195ee/src/tests/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/src/tests/CMakeLists.txt b/src/tests/CMakeLists.txt
index 6e6ecb1..44b74ee 100644
--- a/src/tests/CMakeLists.txt
+++ b/src/tests/CMakeLists.txt
@@ -195,7 +195,6 @@ if (NOT WIN32)
containerizer/provisioner_backend_tests.cpp
containerizer/provisioner_docker_tests.cpp
containerizer/provisioner_paths_tests.cpp
- containerizer/volume_image_isolator_tests.cpp
containerizer/volume_sandbox_path_isolator_tests.cpp
)
endif (NOT WIN32)
@@ -220,6 +219,7 @@ if (LINUX)
containerizer/rootfs.cpp
containerizer/runtime_isolator_tests.cpp
containerizer/sched_tests.cpp
+ containerizer/volume_image_isolator_tests.cpp
)
endif (LINUX)
http://git-wip-us.apache.org/repos/asf/mesos/blob/2d0195ee/src/tests/health_check_tests.cpp
----------------------------------------------------------------------
diff --git a/src/tests/health_check_tests.cpp b/src/tests/health_check_tests.cpp
index debbd3c..710cb66 100644
--- a/src/tests/health_check_tests.cpp
+++ b/src/tests/health_check_tests.cpp
@@ -354,6 +354,7 @@ TEST_F_TEMP_DISABLED_ON_WINDOWS(HealthCheckTest, HealthyTask)
}
+#ifdef __linux__
// This test creates a healthy task with a container image using mesos
// containerizer and verifies that the healthy status is reported to the
// scheduler and is reflected in the state endpoints of both the master
@@ -470,6 +471,7 @@ TEST_F(HealthCheckTest, ROOT_HealthyTaskWithContainerImage)
driver.stop();
driver.join();
}
+#endif // __linux__
// This test creates a healthy task using the Docker executor and