Repository: mesos
Updated Branches:
  refs/heads/master 3144d5abe -> 6e199cc25


CMake: Updated for recent windows changes.

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


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

Branch: refs/heads/master
Commit: 6e199cc255cbf561fac575568b0594ac2b2c14f9
Parents: 25ae902
Author: Alex Clemmer <clemmer.alexan...@gmail.com>
Authored: Wed Jun 15 16:36:05 2016 +0200
Committer: Joris Van Remoortere <joris.van.remoort...@gmail.com>
Committed: Wed Jun 15 19:06:59 2016 +0200

----------------------------------------------------------------------
 CMakeLists.txt                               |   1 +
 cmake/CompilationConfigure.cmake             |   5 +
 src/CMakeLists.txt                           | 197 ++++++++++++++--------
 src/docker/CMakeLists.txt                    |  45 +++++
 src/health-check/CMakeLists.txt              |  46 +++++
 src/launcher/CMakeLists.txt                  |  65 +++++++
 src/slave/CMakeLists.txt                     |  44 +++++
 src/slave/cmake/SlaveConfigure.cmake         |  58 +++++++
 src/slave/containerizer/mesos/CMakeLists.txt |  44 +++++
 src/tests/CMakeLists.txt                     |  20 +++
 src/tests/cmake/MesosTestsConfigure.cmake    | 102 +++++++++++
 src/tests/containerizer/CMakeLists.txt       |  51 ++++++
 src/usage/CMakeLists.txt                     |  44 +++++
 13 files changed, 656 insertions(+), 66 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/6e199cc2/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a1cae6b..c820dcd 100755
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -88,6 +88,7 @@ list(
   CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/3rdparty/libprocess/cmake/macros)
 list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/src/cmake)
 list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/src/slave/cmake)
+list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/src/tests/cmake)
 
 # Macros.
 include(Common)

http://git-wip-us.apache.org/repos/asf/mesos/blob/6e199cc2/cmake/CompilationConfigure.cmake
----------------------------------------------------------------------
diff --git a/cmake/CompilationConfigure.cmake b/cmake/CompilationConfigure.cmake
index 9325e5f..04e3ceb 100644
--- a/cmake/CompilationConfigure.cmake
+++ b/cmake/CompilationConfigure.cmake
@@ -108,10 +108,15 @@ if (NOT WIN32)
   set(PKG_LIBEXEC_INSTALL_DIR ${LIBEXEC_INSTALL_DIR}/mesos)
   set(LIB_INSTALL_DIR         ${EXEC_INSTALL_PREFIX}/libmesos)
 else (NOT WIN32)
+  # TODO(hausdorff): (MESOS-5455) These are placeholder values. Transition away
+  # from them.
   set(EXEC_INSTALL_PREFIX     "WARNINGDONOTUSEME")
   set(LIBEXEC_INSTALL_DIR     "WARNINGDONOTUSEME")
   set(PKG_LIBEXEC_INSTALL_DIR "WARNINGDONOTUSEME")
   set(LIB_INSTALL_DIR         "WARNINGDONOTUSEME")
+  set(TEST_LIB_EXEC_DIR       "WARNINGDONOTUSEME")
+  set(PKG_MODULE_DIR          "WARNINGDONOTUSEME")
+  set(S_BIN_DIR               "WARNINGDONOTUSEME")
 endif (NOT WIN32)
 
 # Add preprocessor definitions required to build third-party libraries.

http://git-wip-us.apache.org/repos/asf/mesos/blob/6e199cc2/src/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 038c805..836c225 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -110,12 +110,18 @@ set(APPC_SRC
   )
 
 set(AUTHENTICATION_SRC
-  authentication/cram_md5/authenticatee.cpp
-  authentication/cram_md5/authenticator.cpp
-  authentication/cram_md5/auxprop.cpp
   authentication/http/basic_authenticator_factory.cpp
   )
 
+if (NOT WIN32)
+  set(AUTHENTICATION_SRC
+    ${AUTHENTICATION_SRC}
+    authentication/cram_md5/authenticatee.cpp
+    authentication/cram_md5/authenticator.cpp
+    authentication/cram_md5/auxprop.cpp
+    )
+endif (NOT WIN32)
+
 set(AUTHORIZER_SRC
   authorizer/acls.cpp
   authorizer/authorizer.cpp
@@ -156,7 +162,6 @@ set(LINUX_SRC
   slave/containerizer/mesos/isolators/docker/volume/driver.cpp
   slave/containerizer/mesos/isolators/docker/volume/isolator.cpp
   slave/containerizer/mesos/isolators/filesystem/linux.cpp
-  slave/containerizer/mesos/isolators/filesystem/posix.cpp
   slave/containerizer/mesos/isolators/filesystem/shared.cpp
   slave/containerizer/mesos/isolators/namespaces/pid.cpp
   slave/containerizer/mesos/isolators/network/cni/cni.cpp
@@ -181,6 +186,11 @@ set(EXEC_SRC
   exec/exec.cpp
   )
 
+set(EXECUTOR_SRC
+  executor/executor.cpp
+  executor/v0_v1executor.cpp
+  )
+
 set(FILES_SRC
   files/files.cpp
   )
@@ -220,26 +230,35 @@ set(LOGGING_SRC
   )
 
 set(MASTER_SRC
-  master/contender/contender.cpp
-  master/detector/detector.cpp
-  master/flags.cpp
-  master/http.cpp
-  master/maintenance.cpp
-  master/master.cpp
-  master/metrics.cpp
-  master/quota.cpp
-  master/quota_handler.cpp
-  master/registry.hpp
-  master/registrar.cpp
   master/validation.cpp
-  master/weights.cpp
-  master/weights_handler.cpp
-  master/allocator/allocator.cpp
-  master/allocator/mesos/hierarchical.cpp
-  master/allocator/mesos/metrics.cpp
-  master/allocator/sorter/drf/sorter.cpp
+  master/detector/detector.cpp
+  master/detector/standalone.cpp
+  master/detector/zookeeper.cpp
   )
 
+if (NOT WIN32)
+  set(MASTER_SRC
+    ${MASTER_SRC}
+    master/flags.cpp
+    master/http.cpp
+    master/maintenance.cpp
+    master/master.cpp
+    master/metrics.cpp
+    master/quota.cpp
+    master/quota_handler.cpp
+    master/registry.hpp
+    master/registrar.cpp
+    # master/repairer.cpp
+    master/weights.cpp
+    master/weights_handler.cpp
+    master/allocator/allocator.cpp
+    master/allocator/mesos/hierarchical.cpp
+    master/allocator/mesos/metrics.cpp
+    master/allocator/sorter/drf/sorter.cpp
+    master/contender/contender.cpp
+    )
+endif (NOT WIN32)
+
 set(MODULE_SRC
   module/manager.cpp
   )
@@ -266,13 +285,42 @@ set(AGENT_SRC
   slave/http.cpp
   slave/metrics.cpp
   slave/paths.cpp
+  slave/slave.cpp
   slave/qos_controller.cpp
   slave/qos_controllers/noop.cpp
+  slave/resource_estimator.cpp
   slave/resource_estimators/noop.cpp
   slave/state.cpp
   slave/status_update_manager.cpp
   slave/validation.cpp
   slave/containerizer/mesos/launch.cpp
+  slave/containerizer/fetcher.cpp
+  slave/containerizer/containerizer.cpp
+  slave/containerizer/external_containerizer.cpp
+  slave/containerizer/composing.cpp
+  slave/containerizer/mesos/containerizer.cpp
+  slave/container_logger.cpp
+  slave/container_loggers/sandbox.cpp
+  slave/containerizer/mesos/isolator.cpp
+  slave/containerizer/mesos/launcher.cpp
+  slave/containerizer/mesos/mount.cpp
+  slave/containerizer/mesos/provisioner/paths.cpp
+  slave/containerizer/mesos/provisioner/provisioner.cpp
+  slave/containerizer/mesos/provisioner/store.cpp
+  slave/containerizer/mesos/provisioner/appc/cache.cpp
+  slave/containerizer/mesos/provisioner/appc/fetcher.cpp
+  slave/containerizer/mesos/provisioner/appc/paths.cpp
+  slave/containerizer/mesos/provisioner/appc/store.cpp
+  slave/containerizer/mesos/provisioner/backend.cpp
+  slave/containerizer/mesos/provisioner/backends/copy.cpp
+  slave/containerizer/mesos/provisioner/docker/local_puller.cpp
+  slave/containerizer/mesos/provisioner/docker/message.proto
+  slave/containerizer/mesos/provisioner/docker/metadata_manager.cpp
+  slave/containerizer/mesos/provisioner/docker/paths.cpp
+  slave/containerizer/mesos/provisioner/docker/puller.cpp
+  slave/containerizer/mesos/provisioner/docker/registry_puller.cpp
+  slave/containerizer/mesos/provisioner/docker/store.cpp
+  slave/containerizer/docker.cpp
   )
 
 if (NOT WIN32)
@@ -282,37 +330,13 @@ if (NOT WIN32)
     slave/container_loggers/sandbox.cpp
     slave/resource_estimator.cpp
     slave/slave.cpp
-    slave/containerizer/composing.cpp
-    slave/containerizer/composing.hpp
-    slave/containerizer/containerizer.cpp
     slave/containerizer/docker.cpp
-    slave/containerizer/docker.hpp
-    slave/containerizer/external_containerizer.cpp
-    slave/containerizer/fetcher.cpp
-    slave/containerizer/mesos/containerizer.cpp
-    slave/containerizer/mesos/isolator.cpp
-    slave/containerizer/mesos/launcher.cpp
     slave/containerizer/mesos/mount.cpp
     slave/containerizer/mesos/isolators/filesystem/posix.cpp
     slave/containerizer/mesos/isolators/posix/disk.cpp
     slave/containerizer/mesos/isolators/docker/volume/paths.cpp
     slave/containerizer/mesos/isolators/network/cni/paths.cpp
     slave/containerizer/mesos/isolators/network/cni/spec.cpp
-    slave/containerizer/mesos/provisioner/docker/local_puller.cpp
-    slave/containerizer/mesos/provisioner/paths.cpp
-    slave/containerizer/mesos/provisioner/provisioner.cpp
-    slave/containerizer/mesos/provisioner/store.cpp
-    slave/containerizer/mesos/provisioner/appc/cache.cpp
-    slave/containerizer/mesos/provisioner/appc/fetcher.cpp
-    slave/containerizer/mesos/provisioner/appc/paths.cpp
-    slave/containerizer/mesos/provisioner/appc/store.cpp
-    slave/containerizer/mesos/provisioner/backend.cpp
-    slave/containerizer/mesos/provisioner/backends/copy.cpp
-    slave/containerizer/mesos/provisioner/docker/metadata_manager.cpp
-    slave/containerizer/mesos/provisioner/docker/paths.cpp
-    slave/containerizer/mesos/provisioner/docker/puller.cpp
-    slave/containerizer/mesos/provisioner/docker/registry_puller.cpp
-    slave/containerizer/mesos/provisioner/docker/store.cpp
     )
 endif (NOT WIN32)
 
@@ -321,10 +345,16 @@ set(URI_SRC
   uri/utils.cpp
   uri/fetchers/copy.cpp
   uri/fetchers/curl.cpp
-  uri/fetchers/docker.cpp
-  uri/fetchers/hadoop.cpp
   )
 
+if (NOT WIN32)
+  set(URI_SRC
+    ${URI_SRC}
+    uri/fetchers/docker.cpp
+    uri/fetchers/hadoop.cpp
+    )
+endif (NOT WIN32)
+
 set(USAGE_SRC
   usage/usage.cpp
   )
@@ -359,38 +389,39 @@ set(MESSAGES_SRC
 
 set(MESOS_SRC
   ${MESOS_SRC}
+  ${AUTHENTICATION_SRC}
+  ${AUTHORIZER_SRC}
   ${AGENT_SRC}
+  ${APPC_SRC}
   ${MESOS_PROTOBUF_SRC}
+  ${MODULE_SRC}
+  ${COMMON_SRC}
+  ${EXECUTOR_SRC}
+  ${V1_SRC}
+  ${HOOK_SRC}
+  ${INTERNAL_SRC}
+  ${FILES_SRC}
+  ${MESSAGES_SRC}
+  ${LOGGING_SRC}
+  ${VERSION_SRC}
+  ${ZOOKEEPER_SRC}
+  ${MASTER_SRC}
+  ${EXEC_SRC}
+  ${DOCKER_SRC}
+  ${USAGE_SRC}
+  ${URI_SRC}
   )
 
 if (NOT WIN32)
   set(MESOS_SRC
     ${MESOS_SRC}
-    ${APPC_SRC}
-    ${AUTHENTICATION_SRC}
-    ${AUTHORIZER_SRC}
-    ${COMMON_SRC}
-    ${DOCKER_SRC}
-    ${EXEC_SRC}
-    ${FILES_SRC}
     ${HDFS_SRC}
-    ${HOOK_SRC}
-    ${INTERNAL_SRC}
     ${LOCAL_SRC}
     ${LOG_SRC}
-    ${LOGGING_SRC}
-    ${MESSAGES_SRC}
-    ${MASTER_SRC}
-    ${MODULE_SRC}
     ${SCHED_SRC}
     ${SCHEDULER_SRC}
     ${STATE_SRC}
-    ${URI_SRC}
-    ${USAGE_SRC}
-    ${V1_SRC}
-    ${VERSION_SRC}
     ${WATCHER_SRC}
-    ${ZOOKEEPER_SRC}
     )
 endif (NOT WIN32)
 
@@ -399,12 +430,20 @@ if (LINUX)
   set(MESOS_SRC ${MESOS_SRC} ${LINUX_SRC})
 endif (LINUX)
 
+# TODO(hausdorff): (MESOS-5455) These are placeholder values. Transition away
+# from them.
+set(BUILD_DATE "\"2016-3-3 10:20\"")
+set(BUILD_TIME "\"1111100\"")
+set(BUILD_USER "\"frank\"")
+set(BUILD_FLAGS "\"\"")
+set(BUILD_JAVA_JVM_LIBRARY "")
+
 # Include source for Windows build.
 if (WIN32)
   set(MESOS_SRC ${MESOS_SRC} ${WIN32_SRC})
 endif (WIN32)
 
-add_definitions(-DUSE_STATIC_LIB -DBUILD_DATE=0 -DBUILD_TIME=0 
-DBUILD_USER="frank" -DBUILD_FLAGS="" -DBUILD_JAVA_JVM_LIBRARY="")
+add_definitions(-DUSE_STATIC_LIB -DBUILD_DATE=${BUILD_DATE} 
-DBUILD_TIME=${BUILD_TIME} -DBUILD_USER=${BUILD_USER} 
-DBUILD_FLAGS=${BUILD_FLAGS} -DBUILD_JAVA_JVM_LIBRARY="")
 
 # INCLUDE DIRECTIVES FOR MESOS LIBRARY (generates, e.g., -I/path/to/thing
 # on Linux).
@@ -429,3 +468,29 @@ add_dependencies(${MESOS_TARGET} ${AGENT_DEPENDENCIES})
 # ADD LINKER FLAGS (generates, e.g., -lglog on Linux).
 ######################################################
 target_link_libraries(${MESOS_TARGET} ${AGENT_LIBS})
+
+# BUILD THE MESOS EXECUTABLES.
+##############################
+add_subdirectory(slave/)
+add_subdirectory(slave/containerizer/mesos/)
+add_subdirectory(launcher/)
+add_subdirectory(health-check/)
+add_subdirectory(docker/)
+add_subdirectory(usage/)
+
+# BUILD THE MESOS TESTS.
+#########################################################
+add_subdirectory(tests/)
+
+
+# mesos-log
+###############################################################################
+#add_executable(${MESOS_LOG} log/main.cpp)
+#target_link_libraries(${MESOS_LOG} ${PROCESS_AGENT_LIBS})
+#add_dependencies(${MESOS_LOG} ${MESOS_FETCHER})
+
+# mesos-master
+###############################################################################
+#add_executable(${MESOS_MASTER} master/main.cpp)
+#target_link_libraries(${MESOS_MASTER} ${PROCESS_AGENT_LIBS})
+#add_dependencies(${MESOS_MASTER} ${MESOS_FETCHER})

http://git-wip-us.apache.org/repos/asf/mesos/blob/6e199cc2/src/docker/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/src/docker/CMakeLists.txt b/src/docker/CMakeLists.txt
new file mode 100644
index 0000000..dca15db
--- /dev/null
+++ b/src/docker/CMakeLists.txt
@@ -0,0 +1,45 @@
+# 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 DOCKER EXECUTOR SOURCE.
+#############################
+set(DOCKER_EXECUTOR_SRC
+  ${DOCKER_EXECUTOR_SRC}
+  executor.cpp
+  )
+
+# INCLUDE DIRECTIVES FOR DOCKER EXECUTOR EXECUTABLE (generates, e.g.,
+# -I/path/to/thing on Linux).
+#####################################################################
+include_directories(${AGENT_INCLUDE_DIRS})
+
+# LINKING LIBRARIES BY DIRECTORY (might generate, e.g., -L/path/to/thing on
+# Linux).
+###########################################################################
+link_directories(${AGENT_LIB_DIRS})
+
+# THE DOCKER EXECUTOR EXECUTABLE.
+#################################
+add_executable(${MESOS_DOCKER_EXECUTOR} ${DOCKER_EXECUTOR_SRC})
+
+# ADD LINKER FLAGS (generates, e.g., -lglog on Linux).
+######################################################
+target_link_libraries(${MESOS_DOCKER_EXECUTOR} ${AGENT_LIBS} ${MESOS_TARGET})
+
+# ADD BINARY DEPENDENCIES (tells CMake what to compile/build first).
+####################################################################
+add_dependencies(${MESOS_DOCKER_EXECUTOR} ${MESOS_TARGET})

http://git-wip-us.apache.org/repos/asf/mesos/blob/6e199cc2/src/health-check/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/src/health-check/CMakeLists.txt b/src/health-check/CMakeLists.txt
new file mode 100644
index 0000000..69e9566
--- /dev/null
+++ b/src/health-check/CMakeLists.txt
@@ -0,0 +1,46 @@
+# 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.
+
+
+# MESOS HEALTH SOURCE.
+######################
+set(HEALTH_EXECUTABLE_SRC
+  ${HEALTH_EXECUTABLE_SRC}
+  main.cpp
+  )
+
+# INCLUDE DIRECTIVES FOR MESOS HEALTH CHECK EXECUTABLE (generates, e.g.,
+# -I/path/to/thing on Linux).
+########################################################################
+include_directories(${AGENT_INCLUDE_DIRS})
+
+# LINKING LIBRARIES BY DIRECTORY (might generate, e.g., -L/path/to/thing on
+# Linux).
+###########################################################################
+link_directories(${AGENT_LIB_DIRS})
+
+# THE MESOS HELATH CHECK EXECUTABLE.
+####################################
+add_executable(${MESOS_HEALTH_CHECK} ${HEALTH_EXECUTABLE_SRC})
+
+# ADD LINKER FLAGS (generates, e.g., -lglog on Linux).
+######################################################
+target_link_libraries(${MESOS_HEALTH_CHECK} ${AGENT_LIBS} ${MESOS_TARGET})
+
+
+# ADD BINARY DEPENDENCIES (tells CMake what to compile/build first).
+####################################################################
+add_dependencies(${MESOS_HEALTH_CHECK} ${MESOS_TARGET})

http://git-wip-us.apache.org/repos/asf/mesos/blob/6e199cc2/src/launcher/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/src/launcher/CMakeLists.txt b/src/launcher/CMakeLists.txt
new file mode 100644
index 0000000..e6ba509
--- /dev/null
+++ b/src/launcher/CMakeLists.txt
@@ -0,0 +1,65 @@
+# 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 MESOS LAUNCHER EXECUTOR SOURCE.
+#####################################
+set(EXECUTOR_EXECUTABLE_SRC
+  ${EXECUTOR_EXECUTABLE_SRC}
+  executor.cpp
+  )
+
+if (NOT WIN32)
+  set(EXECUTOR_EXECUTABLE_SRC
+    ${EXECUTOR_EXECUTABLE_SRC}
+    posix/executor.cpp
+    )
+else (NOT WIN32)
+  set(EXECUTOR_EXECUTABLE_SRC
+    ${EXECUTOR_EXECUTABLE_SRC}
+    windows/executor.cpp
+    )
+endif (NOT WIN32)
+
+# THE MESOS LAUNCHER FETCHER SOURCE.
+####################################
+set(FETCHER_EXECUTABLE_SRC
+  fetcher.cpp
+  )
+
+# INCLUDE DIRECTIVES FOR LAUNCHER EXECUTABLES (generates, e.g., 
-I/path/to/thing
+# on Linux).
+################################################################################
+include_directories(${AGENT_INCLUDE_DIRS})
+
+# LINKING LIBRARIES BY DIRECTORY (might generate, e.g., -L/path/to/thing on
+# Linux).
+###########################################################################
+link_directories(${AGENT_LIB_DIRS})
+
+# THE LAUNCHER EXECUTOR AND FETCHER EXECUTABLES.
+################################################
+add_executable(${MESOS_EXECUTOR} ${EXECUTOR_EXECUTABLE_SRC})
+add_executable(${MESOS_FETCHER} ${FETCHER_EXECUTABLE_SRC})
+
+# ADD LINKER FLAGS (generates, e.g., -lglog on Linux).
+######################################################
+target_link_libraries(${MESOS_EXECUTOR} ${AGENT_LIBS} ${MESOS_TARGET})
+target_link_libraries(${MESOS_FETCHER} ${AGENT_LIBS} ${MESOS_TARGET})
+
+# ADD BINARY DEPENDENCIES (tells CMake what to compile/build first).
+####################################################################
+add_dependencies(${MESOS_EXECUTOR} ${AGENT_DEPENDENCIES})
+add_dependencies(${MESOS_FETCHER} ${AGENT_DEPENDENCIES})

http://git-wip-us.apache.org/repos/asf/mesos/blob/6e199cc2/src/slave/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/src/slave/CMakeLists.txt b/src/slave/CMakeLists.txt
new file mode 100644
index 0000000..d31440c
--- /dev/null
+++ b/src/slave/CMakeLists.txt
@@ -0,0 +1,44 @@
+# 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 AGENT SOURCE.
+###################
+set(AGENT_EXECUTABLE_SRC
+  ${AGENT_EXECUTABLE_SRC}
+  main.cpp
+  )
+
+# INCLUDE DIRECTIVES FOR AGENT EXECUTABLE (generates, e.g., -I/path/to/thing
+# on Linux).
+############################################################################
+include_directories(${AGENT_INCLUDE_DIRS})
+
+# LINKING LIBRARIES BY DIRECTORY (might generate, e.g., -L/path/to/thing on
+# Linux).
+###########################################################################
+link_directories(${AGENT_LIB_DIRS})
+
+# THE AGENT EXECUTABLE.
+#######################
+add_executable(${AGENT_TARGET} ${AGENT_EXECUTABLE_SRC})
+
+# ADD LINKER FLAGS (generates, e.g., -lglog on Linux).
+######################################################
+target_link_libraries(${AGENT_TARGET} ${AGENT_LIBS} ${MESOS_TARGET})
+
+# ADD BINARY DEPENDENCIES (tells CMake what to compile/build first).
+####################################################################
+add_dependencies(${AGENT_TARGET} ${MESOS_TARGET})

http://git-wip-us.apache.org/repos/asf/mesos/blob/6e199cc2/src/slave/cmake/SlaveConfigure.cmake
----------------------------------------------------------------------
diff --git a/src/slave/cmake/SlaveConfigure.cmake 
b/src/slave/cmake/SlaveConfigure.cmake
index 187b5cb..ca45756 100644
--- a/src/slave/cmake/SlaveConfigure.cmake
+++ b/src/slave/cmake/SlaveConfigure.cmake
@@ -85,3 +85,61 @@ if (NOT ENABLE_LIBEVENT)
 elseif (ENABLE_LIBEVENT)
   set(AGENT_LIBS ${AGENT_LIBS} ${LIBEVENT_LFLAG})
 endif (NOT ENABLE_LIBEVENT)
+
+
+############################################################
+
+
+set(
+  PROCESS_AGENT_TARGET slave
+  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.
+###########################################################################
+set(PROCESS_AGENT_DEPENDENCIES
+  ${PROCESS_AGENT_DEPENDENCIES}
+  ${PROCESS_DEPENDENCIES}
+  ${GMOCK_TARGET}
+  )
+
+if (WIN32)
+  set(PROCESS_AGENT_DEPENDENCIES
+    ${PROCESS_AGENT_DEPENDENCIES}
+    )
+endif (WIN32)
+
+# DEFINE THIRD-PARTY INCLUDE DIRECTORIES. Tells compiler toolchain where to get
+# headers for our third party libs (e.g., -I/path/to/glog on Linux).
+###############################################################################
+set(PROCESS_AGENT_INCLUDE_DIRS
+  ${PROCESS_AGENT_INCLUDE_DIRS}
+  ${AGENT_INCLUDE_DIRS}
+  ${PROTOBUF_INCLUDE_DIR}
+  src
+  )
+
+if (WIN32)
+  set(PROCESS_AGENT_INCLUDE_DIRS
+    ${PROCESS_AGENT_INCLUDE_DIRS}
+    ${AGENT_INCLUDE_DIRS}
+  )
+endif (WIN32)
+
+# DEFINE THIRD-PARTY LIB INSTALL DIRECTORIES. Used to tell the compiler
+# toolchain where to find our third party libs (e.g., -L/path/to/glog on
+# Linux).
+########################################################################
+set(PROCESS_AGENT_LIB_DIRS
+  ${PROCESS_AGENT_LIB_DIRS}
+  ${AGENT_LIB_DIRS}
+  )

http://git-wip-us.apache.org/repos/asf/mesos/blob/6e199cc2/src/slave/containerizer/mesos/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/src/slave/containerizer/mesos/CMakeLists.txt 
b/src/slave/containerizer/mesos/CMakeLists.txt
new file mode 100644
index 0000000..8cb3507
--- /dev/null
+++ b/src/slave/containerizer/mesos/CMakeLists.txt
@@ -0,0 +1,44 @@
+# 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.
+
+# SOURCE FILES FOR THE CONTAINERIZER.
+#####################################
+set(CONTAINERIZER_EXECUTABLE_SRC
+  ${CONTAINERIZER_EXECUTABLE_SRC}
+  main.cpp
+  )
+
+# INCLUDE DIRECTIVES FOR CONTAINERIZER EXECUTABLE (generates, e.g.,
+# -I/path/to/thing on Linux).
+###################################################################
+include_directories(${AGENT_INCLUDE_DIRS})
+
+# LINKING LIBRARIES BY DIRECTORY (might generate, e.g., -L/path/to/thing on
+# Linux).
+###########################################################################
+link_directories(${AGENT_LIB_DIRS})
+
+# THE CONTAINERIZER EXECUTABLE.
+###############################
+add_executable(${MESOS_CONTAINERIZER} ${CONTAINERIZER_EXECUTABLE_SRC})
+
+# ADD LINKER FLAGS (generates, e.g., -lglog on Linux).
+######################################################
+target_link_libraries(${MESOS_CONTAINERIZER} ${AGENT_LIBS} ${MESOS_TARGET})
+
+# ADD BINARY DEPENDENCIES (tells CMake what to compile/build first).
+####################################################################
+add_dependencies(${MESOS_CONTAINERIZER} ${MESOS_TARGET})

http://git-wip-us.apache.org/repos/asf/mesos/blob/6e199cc2/src/tests/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/src/tests/CMakeLists.txt b/src/tests/CMakeLists.txt
new file mode 100644
index 0000000..3c53063
--- /dev/null
+++ b/src/tests/CMakeLists.txt
@@ -0,0 +1,20 @@
+# 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.
+
+include(MesosTestsConfigure)
+
+add_subdirectory(containerizer/)
+# TODO(hausdorff): Add the other tests here.

http://git-wip-us.apache.org/repos/asf/mesos/blob/6e199cc2/src/tests/cmake/MesosTestsConfigure.cmake
----------------------------------------------------------------------
diff --git a/src/tests/cmake/MesosTestsConfigure.cmake 
b/src/tests/cmake/MesosTestsConfigure.cmake
new file mode 100644
index 0000000..caecce1
--- /dev/null
+++ b/src/tests/cmake/MesosTestsConfigure.cmake
@@ -0,0 +1,102 @@
+# 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.
+
+set(
+  CONTAINERIZER_MEMORY_TESTS_TARGET mesos-containerizer-memory_test
+  CACHE STRING "Target we use to refer to tests for mesos containerizer tests")
+
+# COMPILER CONFIGURATION.
+#########################
+if (WIN32)
+  STRING(REGEX REPLACE "/" "\\\\" CURRENT_CMAKE_SOURCE_DIR ${CMAKE_SOURCE_DIR})
+  STRING(REGEX REPLACE "/" "\\\\" CURRENT_CMAKE_BUILD_DIR ${CMAKE_BINARY_DIR})
+else (WIN32)
+  set(CURRENT_CMAKE_SOURCE_DIR ${CMAKE_SOURCE_DIR})
+  set(CURRENT_CMAKE_BUILD_DIR ${CMAKE_BINARY_DIR})
+endif (WIN32)
+
+add_definitions(-DSOURCE_DIR="${CURRENT_CMAKE_SOURCE_DIR}")
+add_definitions(-DBUILD_DIR="${CURRENT_CMAKE_BUILD_DIR}")
+
+add_definitions(-DPKGLIBEXECDIR="${PKG_LIBEXEC_INSTALL_DIR}")
+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.
+################################################################################
+set(CONTAINERIZER_TEST_DEPENDENCIES
+  ${CONTAINERIZER_TEST_DEPENDENCIES}
+  ${MESOS_TARGET}
+  ${GMOCK_TARGET}
+  )
+
+# DEFINE THIRD-PARTY INCLUDE DIRECTORIES. Tells compiler toolchain where to get
+# headers for our third party libs (e.g., -I/path/to/glog on Linux)..
+###############################################################################
+set(CONTAINERIZER_TEST_INCLUDE_DIRS
+  ${CONTAINERIZER_TEST_INCLUDE_DIRS}
+  ${GMOCK_INCLUDE_DIR}
+  ${GTEST_INCLUDE_DIR}
+  )
+
+# DEFINE THIRD-PARTY LIB INSTALL DIRECTORIES. Used to tell the compiler
+# toolchain where to find our third party libs (e.g., -L/path/to/glog on
+# Linux).
+########################################################################
+set(CONTAINERIZER_TEST_LIB_DIRS
+  ${CONTAINERIZER_TEST_LIB_DIRS}
+  ${GTEST_LIB_DIR}
+  )
+
+# DEFINE THIRD-PARTY LIBS. Used to generate flags that the linker uses to
+# include our third-party libs (e.g., -lglog on Linux).
+#########################################################################
+set(CONTAINERIZER_TEST_LIBS
+  ${CONTAINERIZER_TEST_LIBS}
+  ${MESOS_TARGET}
+  ${PROCESS_TARGET}
+  ${GTEST_LFLAG}
+  )

http://git-wip-us.apache.org/repos/asf/mesos/blob/6e199cc2/src/tests/containerizer/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/src/tests/containerizer/CMakeLists.txt 
b/src/tests/containerizer/CMakeLists.txt
new file mode 100644
index 0000000..dab8cb0
--- /dev/null
+++ b/src/tests/containerizer/CMakeLists.txt
@@ -0,0 +1,51 @@
+# 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.
+
+# CONTAINERIZER TESTS.
+######################
+set(CONTAINERIZER_MEMORY_TESTS_SRC
+  ${CONTAINERIZER_MEMORY_TESTS_SRC}
+  ${MESOS_SRC_DIR}/tests/flags.cpp
+  ${MESOS_SRC_DIR}/tests/utils.cpp
+  memory_test_helper_main.cpp
+  memory_test_helper.cpp
+  )
+
+# INCLUDE DIRECTIVES FOR CONTAINERIZER TEST BINARY (generates, e.g., 
-I/path/to/thing
+# on Linux).
+#############################################################################
+include_directories(${CONTAINERIZER_TEST_INCLUDE_DIRS})
+
+# LINKING LIBRARIES BY DIRECTORY (might generate, e.g., -L/path/to/thing on
+# Linux).
+###########################################################################
+link_directories(${CONTAINERIZER_TEST_LIB_DIRS})
+
+# THE CONTAINERIZER TEST EXECUTABLE (generates, e.g., stout_tests, etc., on 
Linux).
+###########################################################################
+add_executable(${CONTAINERIZER_MEMORY_TESTS_TARGET} 
${CONTAINERIZER_MEMORY_TESTS_SRC})
+
+# ADD LINKER FLAGS (generates, e.g., -lglog on Linux).
+######################################################
+target_link_libraries(${CONTAINERIZER_MEMORY_TESTS_TARGET} 
${CONTAINERIZER_TEST_LIBS})
+
+# ADD BINARY DEPENDENCIES (tells CMake what to compile/build first).
+####################################################################
+add_dependencies(${CONTAINERIZER_MEMORY_TESTS_TARGET} 
${CONTAINERIZER_TEST_DEPENDENCIES})
+
+# ADD TEST TARGET (runs when you do, e.g., `make check`).
+#########################################################
+add_test(NAME MesosContainerizerMemoryTests COMMAND 
./${CONTAINERIZER_MEMORY_TESTS_TARGET})

http://git-wip-us.apache.org/repos/asf/mesos/blob/6e199cc2/src/usage/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/src/usage/CMakeLists.txt b/src/usage/CMakeLists.txt
new file mode 100644
index 0000000..e5df5e7
--- /dev/null
+++ b/src/usage/CMakeLists.txt
@@ -0,0 +1,44 @@
+# 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 MESOS USAGE SOURCE.
+#########################
+set(USAGE_EXECUTABLE_SRC
+  ${USAGE_EXECUTABLE_SRC}
+  main.cpp
+  )
+
+# INCLUDE DIRECTIVES FOR USAGE EXECUTABLE (generates, e.g., -I/path/to/thing
+# on Linux).
+############################################################################
+include_directories(${AGENT_INCLUDE_DIRS})
+
+# LINKING LIBRARIES BY DIRECTORY (might generate, e.g., -L/path/to/thing on
+# Linux).
+###########################################################################
+link_directories(${AGENT_LIB_DIRS})
+
+# THE USAGE EXECUTABLE.
+#######################
+add_executable(${MESOS_USAGE} ${USAGE_EXECUTABLE_SRC})
+
+# ADD LINKER FLAGS (generates, e.g., -lglog on Linux).
+######################################################
+target_link_libraries(${MESOS_USAGE} ${AGENT_LIBS} ${MESOS_TARGET})
+
+# ADD BINARY DEPENDENCIES (tells CMake what to compile/build first).
+####################################################################
+add_dependencies(${MESOS_USAGE} ${MESOS_TARGET})

Reply via email to