Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMake: fix caching of C++ language feature checks #15613

Merged
merged 1 commit into from
Jul 3, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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