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/07/15 20:11:32 UTC

[2/2] mesos git commit: CMake: Configured a single output folder.

CMake: Configured a single output folder.

The CMake build, by default, creates a build directory structure
analogous to source tree's directory structure.  This ends up
distributing output binaries and libraries throughout the build tree.

This patch updates the CMake build to place output files into
the "src" folder.

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


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

Branch: refs/heads/master
Commit: aa15bcb3637d57ee9c149201ddd8d2f6be767df3
Parents: 1f417f3
Author: Daniel Pravat <dp...@outlook.com>
Authored: Fri Jul 15 11:40:57 2016 -0700
Committer: Joseph Wu <jo...@apache.org>
Committed: Fri Jul 15 12:19:16 2016 -0700

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


http://git-wip-us.apache.org/repos/asf/mesos/blob/aa15bcb3/src/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 4402142..493b6db 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -470,6 +470,13 @@ add_definitions(-DUSE_STATIC_LIB -DBUILD_DATE=${BUILD_DATE} -DBUILD_TIME=${BUILD
 #########################################################################
 include_directories(${AGENT_INCLUDE_DIRS})
 
+# Generate all binaries in the same folder.
+set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/src)
+if (WIN32)
+  SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_BINARY_DIR}/src)
+  SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_BINARY_DIR}/src)
+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/aa15bcb3/src/tests/containerizer/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/src/tests/containerizer/CMakeLists.txt b/src/tests/containerizer/CMakeLists.txt
index dab8cb0..41e792a 100644
--- a/src/tests/containerizer/CMakeLists.txt
+++ b/src/tests/containerizer/CMakeLists.txt
@@ -48,4 +48,4 @@ add_dependencies(${CONTAINERIZER_MEMORY_TESTS_TARGET} ${CONTAINERIZER_TEST_DEPEN
 
 # ADD TEST TARGET (runs when you do, e.g., `make check`).
 #########################################################
-add_test(NAME MesosContainerizerMemoryTests COMMAND ./${CONTAINERIZER_MEMORY_TESTS_TARGET})
+add_test(NAME MesosContainerizerMemoryTests COMMAND ${CMAKE_BINARY_DIR}/src/${CONTAINERIZER_MEMORY_TESTS_TARGET})