3
0
mirror of https://github.com/triqs/dft_tools synced 2024-06-29 00:15:00 +02:00

[cmake] Extend extract_flags.cmake to include cxx_std_23

This commit is contained in:
Nils Wentzell 2023-07-21 12:47:04 -04:00
parent 089a5f5ab2
commit f23ebdf228

View File

@ -60,7 +60,9 @@ macro(extract_flags)
endforeach()
get_property_recursive(cxx_features TARGET ${target} PROPERTY INTERFACE_COMPILE_FEATURES)
if(cxx_std_20 IN_LIST cxx_features)
if(cxx_std_23 IN_LIST cxx_features)
set(${target}_CXXFLAGS "${${target}_CXXFLAGS} -std=c++2b")
elseif(cxx_std_20 IN_LIST cxx_features)
set(${target}_CXXFLAGS "${${target}_CXXFLAGS} -std=c++20")
elseif(cxx_std_17 IN_LIST cxx_features)
set(${target}_CXXFLAGS "${${target}_CXXFLAGS} -std=c++17")