Skip to content

Commit

Permalink
Order c++ standards numerically
Browse files Browse the repository at this point in the history
  • Loading branch information
tmadlener committed Jul 5, 2024
1 parent e725f57 commit f9eb666
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -89,14 +89,14 @@ endif()
# before that it's an empty variable so we check if it's any number > 0
if(NOT DEFINED ROOT_CXX_STANDARD)
get_target_property(ROOT_COMPILE_FEATURES ROOT::Core INTERFACE_COMPILE_FEATURES)
if("cxx_std_17" IN_LIST ROOT_COMPILE_FEATURES)
if("cxx_std_11" IN_LIST ROOT_COMPILE_FEATURES)
set(ROOT_CXX_STANDARD 11)
elseif("cxx_std_14" IN_LIST ROOT_COMPILE_FEATURES)
set(ROOT_CXX_STANDARD 14)
elseif("cxx_std_17" IN_LIST ROOT_COMPILE_FEATURES)
set(ROOT_CXX_STANDARD 17)
elseif("cxx_std_20" IN_LIST ROOT_COMPILE_FEATURES)
set(ROOT_CXX_STANDARD 20)
elseif("cxx_std_14" IN_LIST ROOT_COMPILE_FEATURES)
set(ROOT_CXX_STANDARD 14)
elseif("cxx_std_11" IN_LIST ROOT_COMPILE_FEATURES)
set(ROOT_CXX_STANDARD 11)
else()
message(WARNING "ROOT c++ standard could not be detected")
endif()
Expand Down

0 comments on commit f9eb666

Please sign in to comment.