You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by be...@apache.org on 2015/07/24 01:49:14 UTC

[3/3] mesos git commit: Add small fixes allowing CMake to build Stout tests on OS X 10.10.

Add small fixes allowing CMake to build Stout tests on OS X 10.10.

There are two things that have to change in the current CMake build
solution in order to work on OS X 10.10:

  * librt (which holds the POSIX.1b Realtime Extensions interfaces in
    Linux, including things like async I/O and memory-mapped files,
    etc.)  does not exist on OS X, and does not need to be linked.

  * The version of GTest attempts to find std::tr1::tuple, which is
    not available on OS X 10.10. Like we have done in autotools
    (see[1] and also configure.ac) we simply define
    `GTEST_USE_OWN_TR1_TUPLE` when we're compiling on OS X.

[1] https://mail-archives.apache.org/mod_mbox/mesos-dev/201403.mbox/%3C20140306223933.2625.25724@reviews.apache.org%3E

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


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

Branch: refs/heads/master
Commit: 5a5ab96d6810b1dd55cc3cb159e192997cca4a4c
Parents: c0c03da
Author: Alex Clemmer <cl...@gmail.com>
Authored: Thu Jul 23 16:41:07 2015 -0700
Committer: Benjamin Hindman <be...@gmail.com>
Committed: Thu Jul 23 16:49:08 2015 -0700

----------------------------------------------------------------------
 .../3rdparty/stout/cmake/FindSvn.cmake          |  3 +--
 .../stout/cmake/StoutTestsConfigure.cmake       | 24 +++++++++++++-------
 2 files changed, 17 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/5a5ab96d/3rdparty/libprocess/3rdparty/stout/cmake/FindSvn.cmake
----------------------------------------------------------------------
diff --git a/3rdparty/libprocess/3rdparty/stout/cmake/FindSvn.cmake b/3rdparty/libprocess/3rdparty/stout/cmake/FindSvn.cmake
index c0c0f34..8773739 100644
--- a/3rdparty/libprocess/3rdparty/stout/cmake/FindSvn.cmake
+++ b/3rdparty/libprocess/3rdparty/stout/cmake/FindSvn.cmake
@@ -47,7 +47,6 @@ set(SVN_LIB_NAMES
   svn_delta-1
   svn_diff-1
   svn_fs-1
-  svn_fs_base-1
   svn_fs_fs-1
   svn_fs_util-1
   svn_ra-1
@@ -121,4 +120,4 @@ endif ((NUM_FOUND_LIBS AND (NUM_REQD_LIBS EQUAL NUM_FOUND_LIBS)) AND
 mark_as_advanced(
   SVN_LIB
   SVN_INCLUDE_DIR
-  )
\ No newline at end of file
+  )

http://git-wip-us.apache.org/repos/asf/mesos/blob/5a5ab96d/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 e9be4aa..6e7eb00 100644
--- a/3rdparty/libprocess/3rdparty/stout/cmake/StoutTestsConfigure.cmake
+++ b/3rdparty/libprocess/3rdparty/stout/cmake/StoutTestsConfigure.cmake
@@ -17,6 +17,15 @@
 find_package(Apr REQUIRED)
 find_package(Svn REQUIRED)
 
+# COMPILER CONFIGURATION.
+#########################
+if (APPLE)
+  # GTEST on OSX needs its own tr1 tuple.
+  # TODO(dhamon): Update to gmock 1.7 and pass GTEST_LANG_CXX11 when
+  # in C++11 mode.
+  add_definitions(-DGTEST_USE_OWN_TR1_TUPLE=1)
+endif (APPLE)
+
 # DEFINE PROCESS LIBRARY DEPENDENCIES. Tells the process library build targets
 # download/configure/build all third-party libraries before attempting to build.
 ################################################################################
@@ -83,11 +92,10 @@ set(STOUT_TEST_LIBS
   ${SVN_LIBS}
   )
 
-if (NOT WIN32)
-  find_library(LIBRT_LIBRARIES rt REQUIRED)
-
-  set(STOUT_TEST_LIBS
-    ${STOUT_TEST_LIBS}
-    ${LIBRT_LIBRARIES}
-    )
-endif (NOT 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)
\ No newline at end of file