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:43 UTC

[14/23] mesos git commit: CMake: Changed example module output location and depedencies.

CMake: Changed example module output location and depedencies.

This moves some test libraries from the default CMake build
output locations to `<build_dir>/src/.libs`, which is where
the Automake build outputs libraries.  We have a few tests
that expect modules to be located in this directory.

Additionally, this makes the test target (make check) depend
on the test modules and example frameworks, so that they are built
in the correct order.

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


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

Branch: refs/heads/master
Commit: a7347acb02e5089aa9459f08cc84cc1afda94632
Parents: c8f249b
Author: Joseph Wu <jo...@mesosphere.io>
Authored: Mon Nov 28 15:32:39 2016 -0800
Committer: Joseph Wu <jo...@apache.org>
Committed: Mon Nov 28 15:40:06 2016 -0800

----------------------------------------------------------------------
 src/CMakeLists.txt       |  7 +++++++
 src/tests/CMakeLists.txt | 48 ++++++++++++++++++++++++++++++++++++++++++-
 2 files changed, 54 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/a7347acb/src/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 9799f98..ca47730 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -491,6 +491,13 @@ if (WIN32)
   SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR}/src)
 endif (WIN32)
 
+# Generate all libraries in the same folder to conform with the Automake build.
+set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/src/.libs)
+if (WIN32)
+  SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR}/src/.libs)
+  SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR}/src/.libs)
+endif (WIN32)
+
 # LINKING LIBRARIES BY DIRECTORY (might generate, e.g., -L/path/to/thing on
 # Linux).
 ###########################################################################

http://git-wip-us.apache.org/repos/asf/mesos/blob/a7347acb/src/tests/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/src/tests/CMakeLists.txt b/src/tests/CMakeLists.txt
index 44a9079..2323012 100644
--- a/src/tests/CMakeLists.txt
+++ b/src/tests/CMakeLists.txt
@@ -218,7 +218,53 @@ target_link_libraries(${TEST_HELPER_TARGET} ${MESOS_TESTS_LIBS})
 
 # ADD BINARY DEPENDENCIES (tells CMake what to compile/build first).
 ####################################################################
-add_dependencies(${MESOS_TESTS_TARGET} ${MESOS_TESTS_DEPENDENCIES})
+add_dependencies(
+  ${MESOS_TESTS_TARGET}
+  ${MESOS_TESTS_DEPENDENCIES}
+  ${TEST_HELPER_TARGET}
+  )
+
+if (NOT WIN32)
+  # The tests require all the test modules.
+  # NOTE: Modules are not supported on Windows.
+  add_dependencies(
+    ${MESOS_TESTS_TARGET}
+    ${TEST_ALLOCATOR}
+    ${TEST_ANONYMOUS}
+    ${TEST_AUTHENTICATION}
+    ${TEST_AUTHORIZER}
+    ${TEST_CONTAINER_LOGGER}
+    ${TEST_EXAMPLEMODULE}
+    ${TEST_HOOK}
+    ${TEST_HTTPAUTHENTICATOR}
+    ${TEST_ISOLATOR}
+    ${TEST_MASTER_CONTENDER}
+    ${TEST_MASTER_DETECTOR}
+    ${TEST_QOS_CONTROLLER}
+    ${TEST_RESOURCE_ESTIMATOR}
+    )
+
+  # The tests require all the example frameworks and executors.
+  # TODO(josephw): The scheduler driver is current not built on Windows.
+  add_dependencies(
+    ${MESOS_TESTS_TARGET}
+    ${BALLOON_EXECUTOR}
+    ${BALLOON_FRAMEWORK}
+    ${DISK_FULL_FRAMEWORK}
+    ${DOCKER_NO_EXECUTOR_FRAMEWORK}
+    ${DYNAMIC_RESERVATION_FRAMEWORK}
+    ${LOAD_GENERATOR_FRAMEWORK}
+    ${LONG_LIVED_EXECUTOR}
+    ${LONG_LIVED_FRAMEWORK}
+    ${NO_EXECUTOR_FRAMEWORK}
+    ${PERSISTENT_VOLUME_FRAMEWORK}
+    ${TEST_EXECUTOR}
+    ${TEST_FRAMEWORK}
+    ${TEST_HTTP_EXECUTOR}
+    ${TEST_HTTP_FRAMEWORK}
+    )
+endif (NOT WIN32)
+
 add_dependencies(${TEST_HELPER_TARGET} ${MESOS_TESTS_DEPENDENCIES})
 
 # ADD TEST TARGET (runs when you do, e.g., `make check`).