Skip to content

Commit

Permalink
Detect and use C++17 support for CMake builds
Browse files Browse the repository at this point in the history
  • Loading branch information
ismail authored and stweil committed May 31, 2019
1 parent ee2d717 commit 5df58fc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion CMakeLists.txt
Expand Up @@ -88,7 +88,9 @@ endif()

# Check for C++ standard to use
get_property(known_features GLOBAL PROPERTY CMAKE_CXX_KNOWN_FEATURES)
if(cxx_std_14 IN_LIST known_features)
if(cxx_std_17 IN_LIST known_features)
set(CMAKE_CXX_STANDARD 17)
elseif(cxx_std_14 IN_LIST known_features)
set(CMAKE_CXX_STANDARD 14)
else() # minimum required standard
set(CMAKE_CXX_STANDARD 11)
Expand Down

0 comments on commit 5df58fc

Please sign in to comment.