From: Augustin Degomme Date: Tue, 27 Aug 2019 23:09:12 +0000 (+0200) Subject: let's be gentle with old cmakes which can't handle missing optional boost libs X-Git-Tag: v3.24~131 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/de111d672f9520069004c03d5677986db430d8a2?hp=e58625669e36632ed81ac391312d5676f5f8c247 let's be gentle with old cmakes which can't handle missing optional boost libs --- diff --git a/CMakeLists.txt b/CMakeLists.txt index d126e14bd6..28cb796ab8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -288,7 +288,12 @@ set(_Boost_STACKTRACE_ADDR2LINE_HEADERS "boost/stacktrace.hpp") 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).") + if (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} LESS 3.11) + find_package(Boost 1.48) #try again with just boost, as old cmake may fail. + endif() + if(NOT Boost_FOUND) + message(FATAL_ERROR "Boost libraries not found. Install libboost-dev (>= 1.48.0).") + endif() endif() endif()