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 2016/11/29 00:20:32 UTC

[03/23] mesos git commit: CMake: Use StoutTestsConfigure for test-specific variables.

CMake: Use StoutTestsConfigure for test-specific variables.

Uses test variables defined in `StoutTestsConfigure` instead of
redefining the variables in the Mesos tests.

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


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

Branch: refs/heads/master
Commit: 2e6311e61316ab79edfe7277d43f478d94ea4890
Parents: 4d96985
Author: Joseph Wu <jo...@mesosphere.io>
Authored: Mon Nov 28 15:32:30 2016 -0800
Committer: Joseph Wu <jo...@apache.org>
Committed: Mon Nov 28 15:32:30 2016 -0800

----------------------------------------------------------------------
 3rdparty/CMakeLists.txt                   | 14 ++++++-------
 src/master/cmake/MasterConfigure.cmake    |  8 --------
 src/slave/cmake/SlaveConfigure.cmake      |  8 --------
 src/tests/CMakeLists.txt                  |  1 +
 src/tests/cmake/MesosTestsConfigure.cmake | 28 --------------------------
 5 files changed, 7 insertions(+), 52 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/2e6311e6/3rdparty/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/3rdparty/CMakeLists.txt b/3rdparty/CMakeLists.txt
index 092184b..4dde6ec 100755
--- a/3rdparty/CMakeLists.txt
+++ b/3rdparty/CMakeLists.txt
@@ -265,7 +265,12 @@ endif (WIN32)
 # library tests (located in `3rdparty/`).
 ###############################################################################
 
-include(ProcessTestsConfigure)
+list(
+  APPEND CMAKE_MODULE_PATH
+  ${CMAKE_SOURCE_DIR}/3rdparty/stout/cmake
+  )
+include(StoutConfigure)
+include(StoutTestsConfigure)
 
 if (REBUNDLED)
   set(GMOCK_URL    ${REBUNDLED_DIR}/gmock-${GMOCK_VERSION}.tar.gz)
@@ -334,13 +339,6 @@ ExternalProject_Add(
 #
 # Builds, configures, and compiles the Stout tests.
 ###################################################
-
-list(
-  APPEND CMAKE_MODULE_PATH
-  ${CMAKE_SOURCE_DIR}/3rdparty/stout/cmake
-  )
-include(StoutConfigure)
-include(StoutTestsConfigure)
 add_subdirectory(stout/tests)
 
 

http://git-wip-us.apache.org/repos/asf/mesos/blob/2e6311e6/src/master/cmake/MasterConfigure.cmake
----------------------------------------------------------------------
diff --git a/src/master/cmake/MasterConfigure.cmake b/src/master/cmake/MasterConfigure.cmake
index 6bbd7e8..a15f689 100644
--- a/src/master/cmake/MasterConfigure.cmake
+++ b/src/master/cmake/MasterConfigure.cmake
@@ -95,13 +95,6 @@ set(
   CACHE STRING "Master target")
 
 
-# COMPILER CONFIGURATION.
-#########################
-if (APPLE)
-  # GTEST on OSX needs its own tr1 tuple.
-  add_definitions(-DGTEST_USE_OWN_TR1_TUPLE=1 -DGTEST_LANG_CXX11)
-endif (APPLE)
-
 # DEFINE PROCESS MASTER LIBRARY DEPENDENCIES. Tells the process library build
 # tests target download/configure/build all third-party libraries before
 # attempting to build.
@@ -109,7 +102,6 @@ endif (APPLE)
 set(PROCESS_MASTER_DEPENDENCIES
   ${PROCESS_MASTER_DEPENDENCIES}
   ${PROCESS_DEPENDENCIES}
-  ${GMOCK_TARGET}
   )
 
 if (WIN32)

http://git-wip-us.apache.org/repos/asf/mesos/blob/2e6311e6/src/slave/cmake/SlaveConfigure.cmake
----------------------------------------------------------------------
diff --git a/src/slave/cmake/SlaveConfigure.cmake b/src/slave/cmake/SlaveConfigure.cmake
index b339239..d5152d0 100644
--- a/src/slave/cmake/SlaveConfigure.cmake
+++ b/src/slave/cmake/SlaveConfigure.cmake
@@ -107,13 +107,6 @@ set(
   CACHE STRING "Agent target")
 
 
-# COMPILER CONFIGURATION.
-#########################
-if (APPLE)
-  # GTEST on OSX needs its own tr1 tuple.
-  add_definitions(-DGTEST_USE_OWN_TR1_TUPLE=1 -DGTEST_LANG_CXX11)
-endif (APPLE)
-
 # DEFINE PROCESS AGENT LIBRARY DEPENDENCIES. Tells the process library build
 # tests target download/configure/build all third-party libraries before
 # attempting to build.
@@ -121,7 +114,6 @@ endif (APPLE)
 set(PROCESS_AGENT_DEPENDENCIES
   ${PROCESS_AGENT_DEPENDENCIES}
   ${PROCESS_DEPENDENCIES}
-  ${GMOCK_TARGET}
   )
 
 if (WIN32)

http://git-wip-us.apache.org/repos/asf/mesos/blob/2e6311e6/src/tests/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/src/tests/CMakeLists.txt b/src/tests/CMakeLists.txt
index 90b9225..9351de8 100644
--- a/src/tests/CMakeLists.txt
+++ b/src/tests/CMakeLists.txt
@@ -14,6 +14,7 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
+include(StoutTestsConfigure)
 include(MesosTestsConfigure)
 
 ######################

http://git-wip-us.apache.org/repos/asf/mesos/blob/2e6311e6/src/tests/cmake/MesosTestsConfigure.cmake
----------------------------------------------------------------------
diff --git a/src/tests/cmake/MesosTestsConfigure.cmake b/src/tests/cmake/MesosTestsConfigure.cmake
index 3f543c0..cf00886 100644
--- a/src/tests/cmake/MesosTestsConfigure.cmake
+++ b/src/tests/cmake/MesosTestsConfigure.cmake
@@ -37,34 +37,6 @@ add_definitions(-DTESTLIBEXECDIR="${TEST_LIB_EXEC_DIR}")
 add_definitions(-DPKGMODULEDIR="${PKG_MODULE_DIR}")
 add_definitions(-DSBINDIR="${S_BIN_DIR}")
 
-# DIRECTORY STRUCTURE FOR THIRD-PARTY LIBS REQUIRED FOR TEST INFRASTRUCTURE.
-############################################################################
-EXTERNAL("gmock" ${GMOCK_VERSION} "${MESOS_3RDPARTY_BIN}")
-
-set(GTEST_SRC          ${GMOCK_ROOT}/gtest)
-set(GPERFTOOLS_VERSION 2.0)
-set(GPERFTOOLS         ${MESOS_3RDPARTY_BIN}/gperftools-${GPERFTOOLS_VERSION})
-
-# Convenience variables for include directories of third-party dependencies.
-set(GMOCK_INCLUDE_DIR ${GMOCK_ROOT}/include)
-set(GTEST_INCLUDE_DIR ${GTEST_SRC}/include)
-
-# Convenience variables for `lib` directories of built third-party dependencies.
-if (WIN32)
-  set(GMOCK_LIB_DIR ${GMOCK_ROOT}-build/${CMAKE_BUILD_TYPE})
-  set(GTEST_LIB_DIR ${GMOCK_ROOT}-build/gtest/${CMAKE_BUILD_TYPE})
-else (WIN32)
-  set(GMOCK_LIB_DIR ${GMOCK_ROOT}-lib/lib/)
-  # TODO(hausdorff): Figure out why this path is different from the
-  # `ProcessTestsConfigure` equivalent.
-  set(GTEST_LIB_DIR ${GMOCK_ROOT}-build/gtest/)
-endif (WIN32)
-
-# Convenience variables for "lflags", the symbols we pass to CMake to generate
-# things like `-L/path/to/glog` or `-lglog`.
-#set(GMOCK_LFLAG gmock)
-set(GTEST_LFLAG gtest)
-
 # DEFINE PROCESS LIBRARY DEPENDENCIES. Tells the process library build targets
 # download/configure/build all third-party libraries before attempting to build.
 ################################################################################