From: Timo Heister Date: Tue, 14 Jul 2015 13:11:53 +0000 (-0400) Subject: disable cxx14 if cxx11 fails X-Git-Tag: v8.3.0-rc1~11^2~1 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6281ecdacd2d8bdcf7e87df05d7f151652a869f1;p=dealii.git disable cxx14 if cxx11 fails 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. --- diff --git a/cmake/checks/check_01_cxx_features.cmake b/cmake/checks/check_01_cxx_features.cmake index 2450232e07..f548550bfc 100644 --- a/cmake/checks/check_01_cxx_features.cmake +++ b/cmake/checks/check_01_cxx_features.cmake @@ -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: #