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/08/01 20:29:09 UTC

[3/6] mesos git commit: CMake: Added LogrotateContainerLogger companion executable.

CMake: Added LogrotateContainerLogger companion executable.

This binary is required for the various `LOGROTATE_*` tests.
For now, this binary is not built on Windows due to some
optimizations made inside the executable.

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


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

Branch: refs/heads/master
Commit: 697b55a733d15a5bdc0a524f062f3dd93263a224
Parents: 7dbc74e
Author: Srinivas Brahmaroutu <sr...@us.ibm.com>
Authored: Thu Jul 28 14:49:41 2016 -0700
Committer: Joseph Wu <jo...@apache.org>
Committed: Mon Aug 1 13:12:03 2016 -0700

----------------------------------------------------------------------
 src/slave/CMakeLists.txt             | 23 +++++++++++++++++++++++
 src/slave/cmake/SlaveConfigure.cmake |  4 ++++
 2 files changed, 27 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/697b55a7/src/slave/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/src/slave/CMakeLists.txt b/src/slave/CMakeLists.txt
index bb9ad62..33120ac 100644
--- a/src/slave/CMakeLists.txt
+++ b/src/slave/CMakeLists.txt
@@ -21,6 +21,14 @@ set(AGENT_EXECUTABLE_SRC
   main.cpp
   )
 
+# TODO(josephw): Port this to Windows.
+if (NOT WIN32)
+  set(MESOS_LOGROTATE_LOGGER_SRC
+    ${MESOS_LOGROTATE_LOGGER_SRC}
+    container_loggers/logrotate.cpp
+    )
+endif (NOT WIN32)
+
 add_subdirectory(qos_controllers)
 add_subdirectory(resource_estimators)
 
@@ -38,10 +46,25 @@ link_directories(${AGENT_LIB_DIRS})
 #######################
 add_executable(${AGENT_TARGET} ${AGENT_EXECUTABLE_SRC})
 
+if (NOT WIN32)
+  add_executable(${MESOS_LOGROTATE_LOGGER_TARGET} ${MESOS_LOGROTATE_LOGGER_SRC})
+endif (NOT WIN32)
+
 # ADD LINKER FLAGS (generates, e.g., -lglog on Linux).
 ######################################################
 target_link_libraries(${AGENT_TARGET} ${AGENT_LIBS} ${MESOS_TARGET})
 
+if (NOT WIN32)
+  target_link_libraries(${MESOS_LOGROTATE_LOGGER_TARGET}
+    ${AGENT_LIBS}
+    ${MESOS_TARGET}
+    )
+endif (NOT WIN32)
+
 # ADD BINARY DEPENDENCIES (tells CMake what to compile/build first).
 ####################################################################
 add_dependencies(${AGENT_TARGET} ${MESOS_TARGET})
+
+if (NOT WIN32)
+  add_dependencies(${MESOS_LOGROTATE_LOGGER_TARGET} ${MESOS_TARGET})
+endif (NOT WIN32)

http://git-wip-us.apache.org/repos/asf/mesos/blob/697b55a7/src/slave/cmake/SlaveConfigure.cmake
----------------------------------------------------------------------
diff --git a/src/slave/cmake/SlaveConfigure.cmake b/src/slave/cmake/SlaveConfigure.cmake
index ced5749..b339239 100644
--- a/src/slave/cmake/SlaveConfigure.cmake
+++ b/src/slave/cmake/SlaveConfigure.cmake
@@ -29,6 +29,10 @@ set(RESOURCE_ESTIMATOR_TARGET fixed_resource_estimator
   CACHE STRING "Library containing the fixed resource estimator."
   )
 
+set(MESOS_LOGROTATE_LOGGER_TARGET mesos-logrotate-logger
+  CACHE STRING "Executable used by the logrotate container logger."
+  )
+
 # Define process library dependencies. Tells the process library build targets
 # download/configure/build all third-party libraries before attempting to build.
 ################################################################################