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 2015/10/14 14:30:55 UTC

[1/6] mesos git commit: CMake: Added ability of Windows builds to include protobuf headers.

Repository: mesos
Updated Branches:
  refs/heads/master 8ab200b4d -> ad0ce07d8


CMake: Added ability of Windows builds to include protobuf headers.

Review: https://reviews.apache.org/r/39076


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/bfdd3768
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/bfdd3768
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/bfdd3768

Branch: refs/heads/master
Commit: bfdd3768daaa8d3791a7e5509bcd8056fa710dd9
Parents: 8ab200b
Author: Alex Clemmer <cl...@gmail.com>
Authored: Wed Oct 14 13:52:54 2015 +0200
Committer: Joris Van Remoortere <jo...@gmail.com>
Committed: Wed Oct 14 14:22:23 2015 +0200

----------------------------------------------------------------------
 .../cmake/Process3rdpartyConfigure.cmake         | 19 ++++++++++++-------
 1 file changed, 12 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/bfdd3768/3rdparty/libprocess/cmake/Process3rdpartyConfigure.cmake
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/cmake/Process3rdpartyConfigure.cmake b/3rdparty/libprocess/cmake/Process3rdpartyConfigure.cmake
index ee1c74d..577aac8 100644
--- a/3rdparty/libprocess/cmake/Process3rdpartyConfigure.cmake
+++ b/3rdparty/libprocess/cmake/Process3rdpartyConfigure.cmake
@@ -57,13 +57,14 @@ set(HTTP_PARSER_INCLUDE_DIR ${HTTP_PARSER_ROOT})
 set(LIBEV_INCLUDE_DIR       ${LIBEV_ROOT})
 set(LIBEVENT_INCLUDE_DIR    ${LIBEVENT_LIB_ROOT}/include)
 set(PICOJSON_INCLUDE_DIR    ${PICOJSON_ROOT})
-set(PROTOBUF_INCLUDE_DIR    ${PROTOBUF_LIB_ROOT}/include)
 
 if (WIN32)
-  set(CURL_INCLUDE_DIR ${CURL_ROOT}/include)
-  set(GLOG_INCLUDE_DIR ${GLOG_ROOT}/src/windows)
+  set(CURL_INCLUDE_DIR     ${CURL_ROOT}/include)
+  set(GLOG_INCLUDE_DIR     ${GLOG_ROOT}/src/windows)
+  set(PROTOBUF_INCLUDE_DIR ${PROTOBUF_ROOT}/src)
 else (WIN32)
-  set(GLOG_INCLUDE_DIR ${GLOG_LIB_ROOT}/include)
+  set(GLOG_INCLUDE_DIR     ${GLOG_LIB_ROOT}/include)
+  set(PROTOBUF_INCLUDE_DIR ${PROTOBUF_LIB_ROOT}/include)
 endif (WIN32)
 
 # Convenience variables for `lib` directories of built third-party dependencies.
@@ -73,8 +74,8 @@ set(LIBEVENT_LIB_DIR    ${LIBEVENT_LIB_ROOT}/lib)
 
 if (WIN32)
   set(CURL_LIB_DIR     ${CURL_ROOT}/lib)
-  set(GLOG_LIB_DIR     ${GLOG_ROOT}/Debug)
-  set(PROTOBUF_LIB_DIR ${PROTOBUF_ROOT}/vsprojects/Debug)
+  set(GLOG_LIB_DIR     ${GLOG_ROOT}/${CMAKE_BUILD_TYPE})
+  set(PROTOBUF_LIB_DIR ${PROTOBUF_ROOT}/vsprojects/${CMAKE_BUILD_TYPE})
 else (WIN32)
   set(GLOG_LIB_DIR     ${GLOG_LIB_ROOT}/lib)
   set(PROTOBUF_LIB_DIR ${PROTOBUF_LIB_ROOT}/lib)
@@ -101,7 +102,11 @@ else (WIN32)
 endif (WIN32)
 
 # Convenience variable for `protoc`, the Protobuf compiler.
-set(PROTOC ${PROTOBUF_LIB_ROOT}/bin/protoc)
+if (NOT WIN32)
+  set(PROTOC ${PROTOBUF_LIB_ROOT}/bin/protoc)
+else (NOT WIN32)
+  set(PROTOC ${PROTOBUF_ROOT}/vsprojects/${CMAKE_BUILD_TYPE}/protoc.exe)
+endif (NOT WIN32)
 
 # Configure the process library, the last of our third-party libraries.
 #######################################################################


[2/6] mesos git commit: CMake:[1/3] Prepared stout tests to run with `make check`.

Posted by jo...@apache.org.
CMake:[1/3] Prepared stout tests to run with `make check`.

Right now running the Mesos tests from the default tests target will
(1) aggregate all our tests into a semi-useless report that hides all
the errors, and (2) strip all our colors when you do pass the verbosity
flag to get rid of the "report" structure.

This commit will prepare us to run the tests with with color, without
this default reporting structure. We do this by moving the tests target
to a `CACHE STRING` which can be referenced by the tests.

Review: https://reviews.apache.org/r/39091


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/f4636a72
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/f4636a72
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/f4636a72

Branch: refs/heads/master
Commit: f4636a72954be4c1601b889513357d1e680b830e
Parents: bfdd376
Author: Alex Clemmer <cl...@gmail.com>
Authored: Wed Oct 14 14:01:19 2015 +0200
Committer: Joris Van Remoortere <jo...@gmail.com>
Committed: Wed Oct 14 14:24:57 2015 +0200

----------------------------------------------------------------------
 .../libprocess/3rdparty/stout/cmake/StoutTestsConfigure.cmake    | 4 ++++
 3rdparty/libprocess/3rdparty/stout/tests/CMakeLists.txt          | 2 --
 2 files changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/f4636a72/3rdparty/libprocess/3rdparty/stout/cmake/StoutTestsConfigure.cmake
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/3rdparty/stout/cmake/StoutTestsConfigure.cmake b/3rdparty/libprocess/3rdparty/stout/cmake/StoutTestsConfigure.cmake
index c4d1b7b..acc6e02 100644
--- a/3rdparty/libprocess/3rdparty/stout/cmake/StoutTestsConfigure.cmake
+++ b/3rdparty/libprocess/3rdparty/stout/cmake/StoutTestsConfigure.cmake
@@ -14,6 +14,10 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+set(
+  STOUT_TESTS_TARGET stout_tests
+  CACHE STRING "Target we use to refer to tests for the stout library")
+
 if (NOT WIN32)
   # TODO(hausdorff): (cf. MESOS-3181) Add support for attempting to find these
   # packages on Windows, and then if that fails, use CMake macros/functions to

http://git-wip-us.apache.org/repos/asf/mesos/blob/f4636a72/3rdparty/libprocess/3rdparty/stout/tests/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/3rdparty/stout/tests/CMakeLists.txt b/3rdparty/libprocess/3rdparty/stout/tests/CMakeLists.txt
index 94292f8..0020715 100644
--- a/3rdparty/libprocess/3rdparty/stout/tests/CMakeLists.txt
+++ b/3rdparty/libprocess/3rdparty/stout/tests/CMakeLists.txt
@@ -14,8 +14,6 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-set(STOUT_TESTS_TARGET stout_tests)
-
 # STOUT TESTS.
 ##############
 set(STOUT_TESTS_SRC


[3/6] mesos git commit: CMake:[2/3] Prepared process library tests to run with `make check`.

Posted by jo...@apache.org.
CMake:[2/3] Prepared process library tests to run with `make check`.

Right now running the Mesos tests from the default tests target will (1)
aggregate all our tests into a semi-useless report that hides all the
errors, and (2) strip all our colors when you do pass the verbosity flag
to get rid of the "report" structure.

This commit will prepare us to run the tests with with color, without
this default reporting structure. We do this by moving the tests target
to a `CACHE STRING` which can be referenced by the tests.

Review: https://reviews.apache.org/r/39092


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/8db18591
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/8db18591
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/8db18591

Branch: refs/heads/master
Commit: 8db18591877c9a722a419fd2f413dcdd4c149eab
Parents: f4636a7
Author: Alex Clemmer <cl...@gmail.com>
Authored: Wed Oct 14 14:01:27 2015 +0200
Committer: Joris Van Remoortere <jo...@gmail.com>
Committed: Wed Oct 14 14:29:56 2015 +0200

----------------------------------------------------------------------
 3rdparty/libprocess/cmake/ProcessTestsConfigure.cmake | 4 ++++
 3rdparty/libprocess/src/tests/CMakeLists.txt          | 2 --
 2 files changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/8db18591/3rdparty/libprocess/cmake/ProcessTestsConfigure.cmake
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/cmake/ProcessTestsConfigure.cmake b/3rdparty/libprocess/cmake/ProcessTestsConfigure.cmake
index ea6db09..d60bce2 100644
--- a/3rdparty/libprocess/cmake/ProcessTestsConfigure.cmake
+++ b/3rdparty/libprocess/cmake/ProcessTestsConfigure.cmake
@@ -31,6 +31,10 @@
 #     dependencies (e.g., where to find the .so/.dll files) without having to also
 #     export the variables for the dependencies that only the test package has.
 
+set(
+  PROCESS_TESTS_TARGET process_tests
+  CACHE STRING "Target we use to refer to tests for the process library")
+
 # DIRECTORY STRUCTURE FOR THIRD-PARTY LIBS REQUIRED FOR TEST INFRASTRUCTURE.
 ############################################################################
 EXTERNAL("gmock" ${GMOCK_VERSION} "${PROCESS_3RD_BIN}")

http://git-wip-us.apache.org/repos/asf/mesos/blob/8db18591/3rdparty/libprocess/src/tests/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/src/tests/CMakeLists.txt b/3rdparty/libprocess/src/tests/CMakeLists.txt
index a14b5b8..99c9754 100644
--- a/3rdparty/libprocess/src/tests/CMakeLists.txt
+++ b/3rdparty/libprocess/src/tests/CMakeLists.txt
@@ -14,8 +14,6 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-set(PROCESS_TESTS_TARGET process_tests)
-
 # PROCESS TESTS.
 ################
 set(PROCESS_TESTS_SRC


[4/6] mesos git commit: CMake:[3/3] Added `make check` target.

Posted by jo...@apache.org.
CMake:[3/3] Added `make check` target.

Review: https://reviews.apache.org/r/39093


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/2bec92cf
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/2bec92cf
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/2bec92cf

Branch: refs/heads/master
Commit: 2bec92cf38ff2ab230ce5610c2b094f91a2e72ab
Parents: 8db1859
Author: Alex Clemmer <cl...@gmail.com>
Authored: Wed Oct 14 14:01:37 2015 +0200
Committer: Joris Van Remoortere <jo...@gmail.com>
Committed: Wed Oct 14 14:30:02 2015 +0200

----------------------------------------------------------------------
 CMakeLists.txt | 6 ++++++
 1 file changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/2bec92cf/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a5a66c1..eb93b94 100755
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -92,3 +92,9 @@ add_subdirectory(3rdparty)
 if (NOT WIN32)
   add_subdirectory(src)
 endif (NOT WIN32)
+
+add_custom_target(
+  check ${STOUT_TESTS_TARGET}
+  COMMAND ${PROCESS_TESTS_TARGET}
+  DEPENDS ${PROCESS_TESTS_TARGET} ${STOUT_TESTS_TARGET}
+  )


[6/6] mesos git commit: CMake:[2/2] Removed `__WINDOWS__` flag definition from Stout config.

Posted by jo...@apache.org.
CMake:[2/2] Removed `__WINDOWS__` flag definition from Stout config.

Review: https://reviews.apache.org/r/39097


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/ad0ce07d
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/ad0ce07d
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/ad0ce07d

Branch: refs/heads/master
Commit: ad0ce07d834b19299eda5551625782e8662b4539
Parents: ddc29a9
Author: Alex Clemmer <cl...@gmail.com>
Authored: Wed Oct 14 14:13:18 2015 +0200
Committer: Joris Van Remoortere <jo...@gmail.com>
Committed: Wed Oct 14 14:30:02 2015 +0200

----------------------------------------------------------------------
 .../3rdparty/stout/cmake/StoutTestsConfigure.cmake      | 12 ++----------
 1 file changed, 2 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/ad0ce07d/3rdparty/libprocess/3rdparty/stout/cmake/StoutTestsConfigure.cmake
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/3rdparty/stout/cmake/StoutTestsConfigure.cmake b/3rdparty/libprocess/3rdparty/stout/cmake/StoutTestsConfigure.cmake
index acc6e02..9893d74 100644
--- a/3rdparty/libprocess/3rdparty/stout/cmake/StoutTestsConfigure.cmake
+++ b/3rdparty/libprocess/3rdparty/stout/cmake/StoutTestsConfigure.cmake
@@ -33,18 +33,10 @@ endif (NOT WIN32)
 
 # COMPILER CONFIGURATION.
 #########################
-if (WIN32)
-  # Used to #ifdef out (e.g.) some platform-specific parts of Stout. We choose
-  # to define a new flag rather than using an existing flag (e.g., `_WIN32`)
-  # because we want to give the build system fine-grained control over how what
-  # code is #ifdef'd out in the future, and using only flags defined by our
-  # build system to control this logic is the clearest and stablest way of
-  # doing this.
-  add_definitions(-D__WINDOWS__)
-elseif (APPLE)
+if (APPLE)
   # GTEST on OSX needs its own tr1 tuple.
   add_definitions(-DGTEST_USE_OWN_TR1_TUPLE=1 -DGTEST_LANG_CXX11)
-endif (WIN32)
+endif (APPLE)
 
 # DEFINE PROCESS LIBRARY DEPENDENCIES. Tells the process library build targets
 # download/configure/build all third-party libraries before attempting to build.


[5/6] mesos git commit: CMake:[1/2] Moved `__WINDOWS__` flag definition to CompilationConfigure.

Posted by jo...@apache.org.
CMake:[1/2] Moved `__WINDOWS__` flag definition to CompilationConfigure.

Review: https://reviews.apache.org/r/39096


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/ddc29a9d
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/ddc29a9d
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/ddc29a9d

Branch: refs/heads/master
Commit: ddc29a9d91a443d05d90d66baccfedaa1502e5db
Parents: 2bec92c
Author: Alex Clemmer <cl...@gmail.com>
Authored: Wed Oct 14 14:04:08 2015 +0200
Committer: Joris Van Remoortere <jo...@gmail.com>
Committed: Wed Oct 14 14:30:02 2015 +0200

----------------------------------------------------------------------
 cmake/CompilationConfigure.cmake | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/ddc29a9d/cmake/CompilationConfigure.cmake
----------------------------------------------------------------------
diff --git a/cmake/CompilationConfigure.cmake b/cmake/CompilationConfigure.cmake
index d1d7509..ab503b2 100644
--- a/cmake/CompilationConfigure.cmake
+++ b/cmake/CompilationConfigure.cmake
@@ -65,10 +65,16 @@ else (WIN32)
     "flag. Please use a different C++ compiler.")
 endif (WIN32)
 
-# Convenience flags to simplify Windows support in C++ source.
-if (MSVC)
-  add_definitions(-DMESOS_MSVC)
-endif (MSVC)
+# Convenience flags to simplify Windows support in C++ source, used to #ifdef
+# out some platform-specific parts of Mesos. We choose to define a new flag
+# rather than using an existing flag (e.g., `_WIN32`) because we want to give
+# the build system fine-grained control over what code is #ifdef'd out in  the
+# future. Using only flags defined by our build system to control this logic is
+# the clearest and most stable way of accomplishing this.
+if (WIN32)
+  add_definitions(-D__WINDOWS__)
+endif (WIN32)
+
 
 # Configure directory structure for different platforms.
 ########################################################