From 6281ecdacd2d8bdcf7e87df05d7f151652a869f1 Mon Sep 17 00:00:00 2001 From: Timo Heister Date: Tue, 14 Jul 2015 09:11:53 -0400 Subject: [PATCH] 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. --- cmake/checks/check_01_cxx_features.cmake | 11 +++++++++++ 1 file changed, 11 insertions(+) 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: # -- 2.39.5