Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
cmake: cleanups around Boost detection
authorMartin Quinson <martin.quinson@loria.fr>
Wed, 4 Jul 2018 12:56:01 +0000 (14:56 +0200)
committerMartin Quinson <martin.quinson@loria.fr>
Wed, 4 Jul 2018 12:56:01 +0000 (14:56 +0200)
CMakeLists.txt
ChangeLog

index ca7a1da..89e152a 100644 (file)
@@ -256,36 +256,30 @@ if(enable_smpi_papi)
   endif()
 endif()
 
   endif()
 endif()
 
-# Not finding this is perfectly OK
-find_package(Boost COMPONENTS unit_test_framework)
-if (Boost_UNIT_TEST_FRAMEWORK_FOUND)
-  message(STATUS "Enabling the Boost-based unit tests.")
-else()
-  message(STATUS "Disabling the Boost-based unit tests -- please install libboost-test-dev.")
-endif()
-
-
-find_package(Boost 1.48)
+find_package(Boost 1.59
+             OPTIONAL_COMPONENTS "context;unit_test_framework")
 if(Boost_FOUND)
   include_directories(${Boost_INCLUDE_DIRS})
 else()
   if(APPLE)
     message(FATAL_ERROR "Boost libraries not found. Try to install them with 'sudo fink install boost1.53.nopython' (check the exact name with 'fink list boost') or 'sudo brew install boost'")
   else()
 if(Boost_FOUND)
   include_directories(${Boost_INCLUDE_DIRS})
 else()
   if(APPLE)
     message(FATAL_ERROR "Boost libraries not found. Try to install them with 'sudo fink install boost1.53.nopython' (check the exact name with 'fink list boost') or 'sudo brew install boost'")
   else()
-    message(FATAL_ERROR "Boost libraries not found. Install libboost-dev (>= 1.48.0).")
+    message(FATAL_ERROR "Boost libraries not found. Install libboost-dev (>= 1.54.0).")
   endif()
 endif()
 
   endif()
 endif()
 
-find_package(Boost COMPONENTS context)
-set(Boost_FOUND 1) # This component is optional
+if((NOT Boost_CONTEXT_FOUND) OR (NOT Boost_UNIT_TEST_FRAMEWORK_FOUND))
+  message (STATUS "Missing optional boost libraries:")
+endif()
 if(Boost_CONTEXT_FOUND)
 if(Boost_CONTEXT_FOUND)
-  message(STATUS "Found Boost.Context")
   set(HAVE_BOOST_CONTEXTS 1)
 else()
   set(HAVE_BOOST_CONTEXTS 1)
 else()
-  message ("   boost        : found.")
-  message ("   boost-context: missing. Install libboost-context-dev for this optional feature.")
+  message (STATUS "  context: Install libboost-context-dev.")
   set(HAVE_BOOST_CONTEXTS 0)
 endif()
   set(HAVE_BOOST_CONTEXTS 0)
 endif()
+if (NOT Boost_UNIT_TEST_FRAMEWORK_FOUND)
+  message(STATUS "  test: Install libboost-test-dev.")
+endif()
 
 # Checks for header libraries functions.
 CHECK_LIBRARY_EXISTS(rt      clock_gettime           "" HAVE_POSIX_GETTIME)
 
 # Checks for header libraries functions.
 CHECK_LIBRARY_EXISTS(rt      clock_gettime           "" HAVE_POSIX_GETTIME)
index d7df770..51a1184 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 SimGrid (3.21) NOT RELEASED (Release Target: September 23. 2018, 1:54 UTC)
 
 SimGrid (3.21) NOT RELEASED (Release Target: September 23. 2018, 1:54 UTC)
 
+Other:
+ - Bump our requirement on Boost to 1.59 (released August 2015) to get
+   Boost.test v3
+
 Fixed bugs:
  - #271: Dynamic and manual replay of SMPI traces
  - #279: Breakpoints option uses time deltas instead of absolute time
 Fixed bugs:
  - #271: Dynamic and manual replay of SMPI traces
  - #279: Breakpoints option uses time deltas instead of absolute time