]> https://gitweb.dealii.org/ - dealii.git/commitdiff
CMake: Unset cached results for C++11/14/17 detection if necessary 6498/head
authorMatthias Maier <tamiko@43-1.org>
Sun, 6 May 2018 17:23:50 +0000 (12:23 -0500)
committerMatthias Maier <tamiko@43-1.org>
Sun, 6 May 2018 17:23:50 +0000 (12:23 -0500)
cmake/checks/check_01_cxx_features.cmake

index 7a7680aef213558eee9ebb33e7a47fc5939c7242..139673ac3fda08afb348932553abb187433006f4 100644 (file)
@@ -126,6 +126,11 @@ IF(NOT DEFINED DEAL_II_WITH_CXX17 OR DEAL_II_WITH_CXX17)
     PUSH_CMAKE_REQUIRED("${DEAL_II_CXX_VERSION_FLAG}")
     PUSH_CMAKE_REQUIRED("-Werror")
 
+    UNSET_IF_CHANGED(CHECK_CXX_FEATURES_FLAGS_CXX17_SAVED
+      "${CMAKE_REQUIRED_FLAGS}${DEAL_II_CXX_VERSION_FLAG}"
+      DEAL_II_HAVE_CXX17_ATTRIBUTES
+      )
+
     #
     # Test that the c++17 attributes are supported.
     #
@@ -176,6 +181,14 @@ IF(NOT DEFINED DEAL_II_WITH_CXX14 OR DEAL_II_WITH_CXX14)
   _check_version("14" "1y")
 
   IF(NOT "${DEAL_II_CXX_VERSION_FLAG}" STREQUAL "")
+
+    UNSET_IF_CHANGED(CHECK_CXX_FEATURES_FLAGS_CXX14_SAVED
+      "${CMAKE_REQUIRED_FLAGS}${DEAL_II_CXX_VERSION_FLAG}"
+      DEAL_II_HAVE_CXX14_CLANGAUTODEBUG_BUG_OK
+      DEAL_II_HAVE_CXX14_CONSTEXPR_STDMAXMIN
+      DEAL_II_HAVE_CXX14_MAKE_UNIQUE
+      )
+
     # Set CMAKE_REQUIRED_FLAGS for the unit tests
     PUSH_CMAKE_REQUIRED("${DEAL_II_CXX_VERSION_FLAG}")
 
@@ -256,6 +269,15 @@ IF("${DEAL_II_CXX_VERSION_FLAG}" STREQUAL "")
   _check_version("11" "0x")
 ENDIF()
 
+UNSET_IF_CHANGED(CHECK_CXX_FEATURES_FLAGS_CXX11_SAVED
+  "${CMAKE_REQUIRED_FLAGS}${DEAL_II_CXX_VERSION_FLAG}"
+  DEAL_II_HAVE_CXX11_FEATURES
+  DEAL_II_HAVE_CXX11_FUNCTIONAL_LLVMBUG20084_OK
+  DEAL_II_HAVE_CXX11_ICCLIBSTDCPP47CXX11BUG_OK
+  DEAL_II_HAVE_CXX11_ICCNUMERICLIMITSBUG_OK
+  DEAL_II_HAVE_CXX11_MACOSXC99BUG_OK
+  )
+
 PUSH_CMAKE_REQUIRED("${DEAL_II_CXX_VERSION_FLAG}")
 CHECK_CXX_SOURCE_COMPILES(
   "

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.