From: Gabriel Corona Date: Thu, 18 Jun 2015 09:44:33 +0000 (+0200) Subject: Add the detection of Boost.Context X-Git-Tag: v3_12~575 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/969bf32a0e341d4b1721a61808d6c340cc515b81 Add the detection of Boost.Context It seems I forgot this in the commit :/ --- diff --git a/buildtools/Cmake/CompleteInFiles.cmake b/buildtools/Cmake/CompleteInFiles.cmake index f9d702c08f..ce11861fbc 100644 --- a/buildtools/Cmake/CompleteInFiles.cmake +++ b/buildtools/Cmake/CompleteInFiles.cmake @@ -109,7 +109,7 @@ endif() # intrusive 1.35.0 # lambda 1.28.0 # signals2 1.39.0 -find_package(Boost 1.42 REQUIRED) +find_package(Boost 1.42 REQUIRED COMPONENTS context) if(Boost_FOUND) include_directories(${Boost_INCLUDE_DIRS}) else() @@ -120,6 +120,19 @@ else() endif() endif() +if(Boost_FOUND AND Boost_CONTEXT_FOUND) + # We should use feature detection for this instead: + if (Boost_VERSION LESS 105600) + message("Found suitable Boost.Context") + set(HAVE_BOOST_CONTEXT 1) + else() + message("Found unsuitable version of Boost.Context (${Boost_VERSION}, up to 1.55 is currenly implemented)") + set(HAVE_BOOST_CONTEXT 0) + endif() +else() + set(HAVE_BOOST_CONTEXT 0) +endif() + # Checks for header libraries functions. CHECK_LIBRARY_EXISTS(dl dlopen "" HAVE_DLOPEN_IN_LIBDL) CHECK_LIBRARY_EXISTS(execinfo backtrace "" HAVE_BACKTRACE_IN_LIBEXECINFO)