From: Matthias Maier Date: Tue, 30 Sep 2014 18:46:11 +0000 (+0200) Subject: CMake: Only use internal boost header (if available) for regression check X-Git-Tag: v8.2.0-rc1~117^2 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=10ea820d35ddc15ef11450d084f13765ad218612;p=dealii.git CMake: Only use internal boost header (if available) for regression check Fix a regression where a test for an icc regression in check_01_cxx_features.cmake incorrectly used a generic include. Such an include file doesn't have to be available at this early point in the configuration run. User internal boost headers (if available) instead - otherwise just test nothing. --- diff --git a/cmake/checks/check_01_cxx_features.cmake b/cmake/checks/check_01_cxx_features.cmake index bc9c6bae9a..8bac8a656e 100644 --- a/cmake/checks/check_01_cxx_features.cmake +++ b/cmake/checks/check_01_cxx_features.cmake @@ -221,30 +221,40 @@ IF(NOT DEFINED DEAL_II_WITH_CXX11 OR DEAL_II_WITH_CXX11) # # - Matthias Maier, 2014 # - CHECK_CXX_SOURCE_COMPILES( - " - #include - using namespace boost::signals2; - - class Order {}; - class Foo - { - signal beforeOrder; - void test(Order* o) - { - beforeOrder(o); - } - }; - - int main() - { - Order o; - Foo foo; - return 0; - } - " - DEAL_II_HAVE_CXX11_ICCBOOSTSIGNALSBUG_OK) + # + # Use bundled boost headers for this regression test because external + # features (such as boost) are not yet configured at this point. If we + # have no bundled directory available, skip the test. + # + IF(DEAL_II_HAVE_BUNDLED_DIRECTORY) + CHECK_CXX_SOURCE_COMPILES( + " + #include <${BOOST_FOLDER}/include/boost/signals2/signal.hpp> + using namespace boost::signals2; + + class Order {}; + + class Foo + { + signal beforeOrder; + void test(Order* o) + { + beforeOrder(o); + } + }; + + int main() + { + Order o; + Foo foo; + return 0; + } + " + DEAL_II_HAVE_CXX11_ICCBOOSTSIGNALSBUG_OK) + ELSE() + SET(DEAL_II_HAVE_CXX11_ICCBOOSTSIGNALSBUG_OK TRUE) + ENDIF() IF( DEAL_II_HAVE_CXX11_ARRAY AND