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/03/01 19:30:04 UTC

[08/11] mesos git commit: CMake:[1/3] Moved Stout configuration to its own file.

CMake:[1/3] Moved Stout configuration to its own file.

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


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

Branch: refs/heads/master
Commit: 86191221cc3cf51ba5cc7ebde9903bc34bb0512a
Parents: ab5547d
Author: Alex Clemmer <cl...@gmail.com>
Authored: Mon Feb 29 15:31:12 2016 -0800
Committer: Joris Van Remoortere <jo...@gmail.com>
Committed: Tue Mar 1 10:25:58 2016 -0800

----------------------------------------------------------------------
 .../3rdparty/stout/cmake/StoutConfigure.cmake   | 121 +++++++++++++++++++
 .../stout/cmake/StoutTestsConfigure.cmake       |  64 +---------
 2 files changed, 127 insertions(+), 58 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/86191221/3rdparty/libprocess/3rdparty/stout/cmake/StoutConfigure.cmake
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/3rdparty/stout/cmake/StoutConfigure.cmake b/3rdparty/libprocess/3rdparty/stout/cmake/StoutConfigure.cmake
new file mode 100644
index 0000000..40482e6
--- /dev/null
+++ b/3rdparty/libprocess/3rdparty/stout/cmake/StoutConfigure.cmake
@@ -0,0 +1,121 @@
+# 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.
+
+if (NOT WIN32)
+  # TODO(hausdorff): (cf. MESOS-3181) Add support for attempting to find these
+  # packages on Windows, and then if that fails, use CMake macros/functions to
+  # download, configure, and build them.
+  #
+  # WHY: Windows does not have a good package manager, so getting some of our
+  # dependencies can be really annoying in some circumstances. For this reason,
+  # we should support a CMake-based "distribution channel", even though this
+  # way is sure to be more hackish.
+  find_package(Apr REQUIRED)
+  find_package(Svn REQUIRED)
+endif (NOT WIN32)
+
+# DEFINE PROCESS LIBRARY DEPENDENCIES. Tells the process library build targets
+# download/configure/build all third-party libraries before attempting to build.
+################################################################################
+set(STOUT_DEPENDENCIES
+  ${STOUT_DEPENDENCIES}
+  ${BOOST_TARGET}
+  ${GLOG_TARGET}
+  ${PROTOBUF_TARGET}
+  ${PICOJSON_TARGET}
+  )
+
+if (WIN32)
+  set(STOUT_DEPENDENCIES
+    ${STOUT_DEPENDENCIES}
+    ${CURL_TARGET}
+    )
+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(STOUT_INCLUDE_DIRS
+  ${STOUT_INCLUDE_DIRS}
+  ${STOUT_INCLUDE_DIR}
+  ${APR_INCLUDE_DIR}
+  ${BOOST_INCLUDE_DIR}
+  ${GLOG_INCLUDE_DIR}
+  ${PICOJSON_INCLUDE_DIR}
+  ${PROTOBUF_INCLUDE_DIR}
+  ${SVN_INCLUDE_DIR}
+  src
+  )
+
+if (WIN32)
+  set(STOUT_INCLUDE_DIRS
+    ${STOUT_INCLUDE_DIRS}
+    ${CURL_INCLUDE_DIR}
+    )
+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(STOUT_LIB_DIRS
+  ${STOUT_LIB_DIRS}
+  ${APR_LIBS}
+  ${GLOG_LIB_DIR}
+  ${PROTOBUF_LIB_DIR}
+  ${SVN_LIBS}
+  )
+
+if (WIN32)
+  set(STOUT_LIB_DIRS
+    ${STOUT_LIB_DIRS}
+    ${CURL_LIB_DIR}
+    )
+endif (WIN32)
+
+# DEFINE THIRD-PARTY LIBS. Used to generate flags that the linker uses to
+# include our third-party libs (e.g., -lglog on Linux).
+#########################################################################
+set(STOUT_LIBS
+  ${STOUT_LIBS}
+  ${CMAKE_THREAD_LIBS_INIT}
+  ${CURL_LFLAG}
+  ${GLOG_LFLAG}
+  ${SVN_LIBS}
+  ${PROTOBUF_LFLAG}
+  )
+
+if (WIN32)
+  set(STOUT_LIBS
+    ${STOUT_LIBS}
+    ws2_32
+    Mswsock
+    )
+else (WIN32)
+  set(STOUT_LIBS
+    ${STOUT_LIBS}
+    ${DL_LFLAG}
+    apr-1
+    )
+endif (WIN32)
+
+# TODO(hausdorff): The `LINUX` flag comes from MesosConfigure; when we
+# port the bootstrap script to CMake, we should also copy this logic
+# into .cmake files in the Stout and Process libraries' folders
+# individually.
+if (LINUX)
+  set(STOUT_LIBS ${STOUT_LIBS} rt)
+endif (LINUX)

http://git-wip-us.apache.org/repos/asf/mesos/blob/86191221/3rdparty/libprocess/3rdparty/stout/cmake/StoutTestsConfigure.cmake
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/3rdparty/stout/cmake/StoutTestsConfigure.cmake b/3rdparty/libprocess/3rdparty/stout/cmake/StoutTestsConfigure.cmake
index 64b9412..2c786c5 100644
--- a/3rdparty/libprocess/3rdparty/stout/cmake/StoutTestsConfigure.cmake
+++ b/3rdparty/libprocess/3rdparty/stout/cmake/StoutTestsConfigure.cmake
@@ -18,19 +18,6 @@ set(
   STOUT_TESTS_TARGET stout_tests
   CACHE STRING "Target we use to refer to tests for the stout library")
 
-if (NOT WIN32)
-  # TODO(hausdorff): (cf. MESOS-3181) Add support for attempting to find these
-  # packages on Windows, and then if that fails, use CMake macros/functions to
-  # download, configure, and build them.
-  #
-  # WHY: Windows does not have a good package manager, so getting some of our
-  # dependencies can be really annoying in some circumstances. For this reason,
-  # we should support a CMake-based "distribution channel", even though this
-  # way is sure to be more hackish.
-  find_package(Apr REQUIRED)
-  find_package(Svn REQUIRED)
-endif (NOT WIN32)
-
 # COMPILER CONFIGURATION.
 #########################
 if (APPLE)
@@ -43,83 +30,44 @@ endif (APPLE)
 ################################################################################
 set(STOUT_TEST_DEPENDENCIES
   ${STOUT_TEST_DEPENDENCIES}
-  ${BOOST_TARGET}
-  ${GLOG_TARGET}
+  ${STOUT_DEPENDENCIES}
   ${GMOCK_TARGET}
   ${GTEST_TARGET}
-  ${PROTOBUF_TARGET}
   )
 
-if (WIN32)
-  set(STOUT_TEST_DEPENDENCIES ${STOUT_TEST_DEPENDENCIES} ${CURL_TARGET})
-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(STOUT_TEST_INCLUDE_DIRS
   ${STOUT_TEST_INCLUDE_DIRS}
-  ${STOUT_INCLUDE_DIR}
-  ${BOOST_INCLUDE_DIR}
-  ${PICOJSON_INCLUDE_DIR}
-  ${APR_INCLUDE_DIR}
-  ${SVN_INCLUDE_DIR}
+  ${STOUT_INCLUDE_DIRS}
   ${GMOCK_INCLUDE_DIR}
   ${GTEST_INCLUDE_DIR}
-  ${PROTOBUF_INCLUDE_DIR}
-  src
-  ${GLOG_INCLUDE_DIR}
   )
 
-if (WIN32)
-  set(STOUT_TEST_INCLUDE_DIRS ${STOUT_TEST_INCLUDE_DIRS} ${CURL_INCLUDE_DIR})
-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(STOUT_TEST_LIB_DIRS
   ${STOUT_TEST_LIB_DIRS}
-  ${APR_LIBS}
-  ${SVN_LIBS}
+  ${STOUT_LIB_DIRS}
   ${GMOCK_LIB_DIR}
   ${GTEST_LIB_DIR}
-  ${GLOG_LIB_DIR}
-  ${PROTOBUF_LIB_DIR}
   )
 
-if (WIN32)
-  set(STOUT_TEST_LIB_DIRS ${STOUT_TEST_LIB_DIRS} ${CURL_LIB_DIR})
-endif (WIN32)
-
 # DEFINE THIRD-PARTY LIBS. Used to generate flags that the linker uses to
 # include our third-party libs (e.g., -lglog on Linux).
 #########################################################################
 set(STOUT_TEST_LIBS
   ${STOUT_TEST_LIBS}
-  ${CMAKE_THREAD_LIBS_INIT}
+  ${STOUT_LIBS}
   ${GMOCK_LFLAG}
-  ${SVN_LIBS}
-  ${GLOG_LFLAG}
-  ${PROTOBUF_LFLAG}
   )
 
-if (WIN32)
-  set(STOUT_TEST_LIBS ${STOUT_TEST_LIBS} ${CURL_LFLAG} ws2_32)
-else (WIN32)
+if (NOT WIN32)
   set(STOUT_TEST_LIBS
     ${STOUT_TEST_LIBS}
     ${GTEST_LFLAG}
-    ${DL_LFLAG}
-    apr-1
     )
-endif (WIN32)
-
-# TODO(hausdorff): The `LINUX` flag comes from MesosConfigure; when we
-# port the bootstrap script to CMake, we should also copy this logic
-# into .cmake files in the Stout and Process libraries' folders
-# individually.
-if (LINUX)
-  set(STOUT_TEST_LIBS ${STOUT_TEST_LIBS} rt)
-endif (LINUX)
+endif (NOT WIN32)