X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/853baf79434abbab6ad23c839eb86f68ea546896..b1801e7056930569752cf33757134cb44d32cfac:/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index 89e152afc3..29c931bd05 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -256,30 +256,36 @@ if(enable_smpi_papi) endif() endif() -find_package(Boost 1.59 - OPTIONAL_COMPONENTS "context;unit_test_framework") +# Not finding this is perfectly OK +find_package(Boost 1.59 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 (>= v1.59).") +endif() + + +find_package(Boost 1.48) 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.54.0).") + message(FATAL_ERROR "Boost libraries not found. Install libboost-dev (>= 1.48.0).") endif() endif() -if((NOT Boost_CONTEXT_FOUND) OR (NOT Boost_UNIT_TEST_FRAMEWORK_FOUND)) - message (STATUS "Missing optional boost libraries:") -endif() +find_package(Boost COMPONENTS context) +set(Boost_FOUND 1) # This component is optional if(Boost_CONTEXT_FOUND) + message(STATUS "Found Boost.Context") set(HAVE_BOOST_CONTEXTS 1) else() - message (STATUS " context: Install libboost-context-dev.") + message (" boost : found.") + message (" boost-context: missing. Install libboost-context-dev for this optional feature.") 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)