From: degomme Date: Wed, 27 Apr 2016 13:21:00 +0000 (+0200) Subject: Add warning, as next Boost release will break boost context factory. X-Git-Tag: v3_13~14 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/b41b3ad49611254fa77d5de86ca175584dfa997e?ds=sidebyside Add warning, as next Boost release will break boost context factory. In details, fcontext_t is no longer part of the public API --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 35e6428f1f..4ac8d05efb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -232,23 +232,34 @@ else() 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 +#Boost context 1.61 will break compatibility with our implementation. +#Warn users about that +find_package(Boost 1.61 COMPONENTS context) if(Boost_FOUND AND Boost_CONTEXT_FOUND) - # We should use feature detection for this instead: - if (Boost_VERSION LESS 105600) - message("Found Boost.Context API v1") - set(HAVE_BOOST_CONTEXTS 1) + message("WARNING : our implementation of Boost context factory is not compatible with Boost >=1.61 yet.") + + set(Boost_FOUND 1) + set(HAVE_BOOST_CONTEXTS 0) +else() +# 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) + message("Found Boost.Context API v1") + set(HAVE_BOOST_CONTEXTS 1) + else() + message("Found Boost.Context API v2") + set(HAVE_BOOST_CONTEXTS 2) + endif() else() - message("Found Boost.Context API v2") - set(HAVE_BOOST_CONTEXTS 2) + message (" boost : found.") + message (" boost-context: missing. Install libboost-context-dev for this optional feature.") + set(HAVE_BOOST_CONTEXTS 0) endif() -else() - message (" boost : found.") - message (" boost-context: missing. Install libboost-context-dev for this optional feature.") - set(HAVE_BOOST_CONTEXTS 0) endif() # Try again to see if we have libboost-graph