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

[1/2] mesos git commit: CMake: Added scripts to build some agent modules.

Repository: mesos
Updated Branches:
  refs/heads/master c4cecf9c2 -> aa15bcb36


CMake: Added scripts to build some agent modules.

This adds build steps for the "load" QoS Controller and the "fixed"
Resource Estimator modules.

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


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

Branch: refs/heads/master
Commit: 1f417f3f71540d7fe612c95c145ef201df921352
Parents: c4cecf9
Author: Srinivas Brahmaroutu <sr...@us.ibm.com>
Authored: Fri Jul 15 11:18:26 2016 -0700
Committer: Joseph Wu <jo...@apache.org>
Committed: Fri Jul 15 11:20:25 2016 -0700

----------------------------------------------------------------------
 src/slave/CMakeLists.txt                     |  3 ++
 src/slave/cmake/SlaveConfigure.cmake         |  8 ++++++
 src/slave/qos_controllers/CMakeLists.txt     | 34 +++++++++++++++++++++++
 src/slave/resource_estimators/CMakeLists.txt | 34 +++++++++++++++++++++++
 4 files changed, 79 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/1f417f3f/src/slave/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/src/slave/CMakeLists.txt b/src/slave/CMakeLists.txt
index d31440c..bb9ad62 100644
--- a/src/slave/CMakeLists.txt
+++ b/src/slave/CMakeLists.txt
@@ -21,6 +21,9 @@ set(AGENT_EXECUTABLE_SRC
   main.cpp
   )
 
+add_subdirectory(qos_controllers)
+add_subdirectory(resource_estimators)
+
 # INCLUDE DIRECTIVES FOR AGENT EXECUTABLE (generates, e.g., -I/path/to/thing
 # on Linux).
 ############################################################################

http://git-wip-us.apache.org/repos/asf/mesos/blob/1f417f3f/src/slave/cmake/SlaveConfigure.cmake
----------------------------------------------------------------------
diff --git a/src/slave/cmake/SlaveConfigure.cmake b/src/slave/cmake/SlaveConfigure.cmake
index ca45756..ced5749 100644
--- a/src/slave/cmake/SlaveConfigure.cmake
+++ b/src/slave/cmake/SlaveConfigure.cmake
@@ -21,6 +21,14 @@ if (NOT WIN32)
   find_package(Svn REQUIRED)
 endif (NOT WIN32)
 
+set(QOS_CONTROLLER_TARGET load_qos_controller
+  CACHE STRING "Library containing the load qos controller."
+  )
+
+set(RESOURCE_ESTIMATOR_TARGET fixed_resource_estimator
+  CACHE STRING "Library containing the fixed resource estimator."
+  )
+
 # 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/1f417f3f/src/slave/qos_controllers/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/src/slave/qos_controllers/CMakeLists.txt b/src/slave/qos_controllers/CMakeLists.txt
new file mode 100644
index 0000000..87c92af
--- /dev/null
+++ b/src/slave/qos_controllers/CMakeLists.txt
@@ -0,0 +1,34 @@
+# 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.
+
+# THE QOS_CONTROLLER SOURCE.
+############################
+set(QOS_CONTROLLER_SRC
+  ${QOS_CONTROLLER_SRC}
+  load.cpp
+  )
+
+# THE AGENT EXECUTABLE.
+#######################
+add_library(${QOS_CONTROLLER_TARGET} SHARED ${QOS_CONTROLLER_SRC})
+
+# ADD LINKER FLAGS (generates, e.g., -lglog on Linux).
+######################################################
+target_link_libraries(${QOS_CONTROLLER_TARGET} ${AGENT_LIBS} ${MESOS_TARGET})
+
+# ADD BINARY DEPENDENCIES (tells CMake what to compile/build first).
+####################################################################
+add_dependencies(${QOS_CONTROLLER_TARGET} ${MESOS_TARGET})

http://git-wip-us.apache.org/repos/asf/mesos/blob/1f417f3f/src/slave/resource_estimators/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/src/slave/resource_estimators/CMakeLists.txt b/src/slave/resource_estimators/CMakeLists.txt
new file mode 100644
index 0000000..17b149f
--- /dev/null
+++ b/src/slave/resource_estimators/CMakeLists.txt
@@ -0,0 +1,34 @@
+# 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.
+
+# THE RESOURCE_ESTIMATOR SOURCE.
+################################
+set(RESOURCE_ESTIMATOR_SRC
+  ${RESOURCE_ESTIMATOR_SRC}
+  fixed.cpp
+  )
+
+# THE AGENT EXECUTABLE.
+#######################
+add_library(${RESOURCE_ESTIMATOR_TARGET} SHARED ${RESOURCE_ESTIMATOR_SRC})
+
+# ADD LINKER FLAGS (generates, e.g., -lglog on Linux).
+######################################################
+target_link_libraries(${RESOURCE_ESTIMATOR_TARGET} ${AGENT_LIBS} ${MESOS_TARGET})
+
+# ADD BINARY DEPENDENCIES (tells CMake what to compile/build first).
+####################################################################
+add_dependencies(${RESOURCE_ESTIMATOR_TARGET} ${MESOS_TARGET})


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

Posted by jo...@apache.org.
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})