Skip to content

Commit

Permalink
Merge pull request #15613 from tamiko/fix_cmake_caching_01
Browse files Browse the repository at this point in the history
CMake: fix caching of C++ language feature checks
  • Loading branch information
tamiko committed Jul 3, 2023
2 parents 68614f5 + 81b0207 commit 7a77514
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cmake/checks/check_01_cxx_features.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,7 @@ macro(_test_cxx17_support)
}
"
DEAL_II_HAVE_CXX14_CLANGAUTODEBUG_BUG_OK)
_set_up_cmake_required()

# Check some generic C++11 features
CHECK_CXX_SOURCE_COMPILES(
Expand Down Expand Up @@ -307,9 +308,9 @@ endmacro()
_set_up_cmake_required()
_test_cxx17_support()

if(NOT DEAL_II_HAVE_CXX14)
if(NOT DEAL_II_HAVE_CXX17)
#
# We failed to detect C++14 support. Let's make an attempt to set the
# We failed to detect C++17 support. Let's make an attempt to set the
# -std= compiler flag. (But in order to minimize confusion let's not
# override any manually specified -std= flag or CMAKE_CXX_STANDARD
# variable set by the user.)
Expand All @@ -333,7 +334,6 @@ if(NOT DEAL_II_HAVE_CXX17)
)
endif()

_test_cxx17_support()
_test_cxx20_support()

set_if_empty(CMAKE_CXX_STANDARD "${_cxx_standard}")
Expand Down

0 comments on commit 7a77514

Please sign in to comment.