]> https://gitweb.dealii.org/ - dealii.git/commitdiff
disable cxx14 if cxx11 fails
authorTimo Heister <timo.heister@gmail.com>
Tue, 14 Jul 2015 13:11:53 +0000 (09:11 -0400)
committerTimo Heister <timo.heister@gmail.com>
Tue, 14 Jul 2015 13:11:53 +0000 (09:11 -0400)
Finally disable cxx14 if cxx11 detection failed for whatever reason.
Before we could end up in a situation with CXX14=TRUE and CXX11=FALSE
even if nothing was specified during configure time. Running cmake a
second time would then bail out.

cmake/checks/check_01_cxx_features.cmake

index 2450232e074ec9837b7d43ef7b96acbd61b0f757..f548550bfcdcfa2a0595110087c2e3c28e78c203 100644 (file)
@@ -324,6 +324,17 @@ IF(NOT DEFINED DEAL_II_WITH_CXX11 OR DEAL_II_WITH_CXX11)
   ENDIF()
 ENDIF()
 
+
+#
+# Finally disable cxx14 if cxx11 detection failed for whatever reason. This
+# can happen if any of our compile checks above fails, for example threading
+# support.
+# 
+IF (DEAL_II_HAVE_CXX14 AND NOT DEAL_II_HAVE_CXX11)
+  MESSAGE(STATUS "Disabling CXX14 support because CXX11 detection failed.")
+  SET(DEAL_II_HAVE_CXX14 FALSE)
+ENDIF()
+
 #
 # Set up a configuration options for C++11 and C++14 support:
 #

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.