Skip to content

Commit 5df58fc

Browse files
ismailstweil
authored andcommitted
Detect and use C++17 support for CMake builds
1 parent ee2d717 commit 5df58fc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

CMakeLists.txt

+3-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,9 @@ endif()
8888

8989
# Check for C++ standard to use
9090
get_property(known_features GLOBAL PROPERTY CMAKE_CXX_KNOWN_FEATURES)
91-
if(cxx_std_14 IN_LIST known_features)
91+
if(cxx_std_17 IN_LIST known_features)
92+
set(CMAKE_CXX_STANDARD 17)
93+
elseif(cxx_std_14 IN_LIST known_features)
9294
set(CMAKE_CXX_STANDARD 14)
9395
else() # minimum required standard
9496
set(CMAKE_CXX_STANDARD 11)

0 commit comments

Comments
 (0)