]> https://gitweb.dealii.org/ - dealii.git/commitdiff
CMake: Only use internal boost header (if available) for regression check 184/head
authorMatthias Maier <tamiko@kyomu.43-1.org>
Tue, 30 Sep 2014 18:46:11 +0000 (20:46 +0200)
committerMatthias Maier <tamiko@kyomu.43-1.org>
Tue, 30 Sep 2014 18:46:11 +0000 (20:46 +0200)
Fix a regression where a test for an icc regression in
check_01_cxx_features.cmake incorrectly used a generic <boost/signals2/...>
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.

cmake/checks/check_01_cxx_features.cmake

index bc9c6bae9aa8e6b4c8d6ebf04e2f0072ef61fc99..8bac8a656e7752d54082e6c01dc4a348dc20363a 100644 (file)
@@ -221,30 +221,40 @@ IF(NOT DEFINED DEAL_II_WITH_CXX11 OR DEAL_II_WITH_CXX11)
   #
   # - Matthias Maier, 2014
   #
-  CHECK_CXX_SOURCE_COMPILES(
-    "
-    #include <boost/signals2/signal.hpp>
-    using namespace boost::signals2;
-
-    class Order {};
 
-    class Foo
-    {
-     signal<void(Order*)> 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<void(Order*)> 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

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.