X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/8fe6b74436b1f2f8c641cc8552714db1d1bc66bb..5960f4118ff88d4f39043e486fb56f73d64b15ef:/buildtools/Cmake/CompleteInFiles.cmake diff --git a/buildtools/Cmake/CompleteInFiles.cmake b/buildtools/Cmake/CompleteInFiles.cmake index 9fad3e0146..52aef28cb1 100644 --- a/buildtools/Cmake/CompleteInFiles.cmake +++ b/buildtools/Cmake/CompleteInFiles.cmake @@ -111,22 +111,23 @@ if(enable_ns3) endif() endif() -# algorithm 1.50.0 -# function 1.23.0 -# intrusive 1.35.0 -# lambda 1.28.0 -# signals2 1.39.0 -find_package(Boost 1.42 COMPONENTS context) +find_package(Boost 1.48) if(Boost_FOUND) include_directories(${Boost_INCLUDE_DIRS}) else() - if(APPLE) #MAC + if(APPLE) message(FATAL_ERROR "Failed to find Boost libraries (Try to install them with 'sudo fink install boost1.53.nopython')") else() - message(FATAL_ERROR "Failed to find Boost libraries. Did you install libboost-dev and libboost-context-dev?") + message(FATAL_ERROR "Failed to find Boost libraries." + "Did you install libboost-dev and libboost-context-dev?" + "(libboost-context-dev is optional)") endif() endif() +# Try again to see if we have libboost-context +find_package(Boost 1.42 COMPONENTS context) +set(Boost_FOUND 1) # We don't care of whether this component is missing + if(Boost_FOUND AND Boost_CONTEXT_FOUND) # We should use feature detection for this instead: if (Boost_VERSION LESS 105600) @@ -137,6 +138,8 @@ if(Boost_FOUND AND Boost_CONTEXT_FOUND) set(HAVE_BOOST_CONTEXT 2) endif() else() + message (" boost : found.") + message (" boost-context: missing. Install libboost-context-dev for this optional feature.") set(HAVE_BOOST_CONTEXT 0) endif() @@ -835,8 +838,8 @@ set(CMAKE_SMPI_COMMAND "export LD_LIBRARY_PATH=\"${CMAKE_INSTALL_PREFIX}/lib") if(GTNETS_LIB_PATH) set(CMAKE_SMPI_COMMAND "${CMAKE_SMPI_COMMAND}:${GTNETS_LIB_PATH}") endif() -if(HAVE_NS3_LIB) - set(CMAKE_SMPI_COMMAND "${CMAKE_SMPI_COMMAND}:${HAVE_NS3_LIB}") +if(NS3_LIBRARY_PATH) + set(CMAKE_SMPI_COMMAND "${CMAKE_SMPI_COMMAND}:${NS3_LIBRARY_PATH}") endif() set(CMAKE_SMPI_COMMAND "${CMAKE_SMPI_COMMAND}:\${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}\"") @@ -857,8 +860,8 @@ set(CMAKE_SMPI_COMMAND "export LD_LIBRARY_PATH=\"${CMAKE_BINARY_DIR}/lib") if(GTNETS_LIB_PATH) set(CMAKE_SMPI_COMMAND "${CMAKE_SMPI_COMMAND}:${GTNETS_LIB_PATH}") endif() -if(HAVE_NS3_LIB) - set(CMAKE_SMPI_COMMAND "${CMAKE_SMPI_COMMAND}:${HAVE_NS3_LIB}") +if(NS3_LIBRARY_PATH) + set(CMAKE_SMPI_COMMAND "${CMAKE_SMPI_COMMAND}:${NS3_LIBRARY_PATH}") endif() set(CMAKE_SMPI_COMMAND "${CMAKE_SMPI_COMMAND}:\${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}\"") set(libdir "${CMAKE_BINARY_DIR}/lib")