mirror of
https://github.com/Kitware/CMake.git
synced 2025-12-31 19:00:54 -06:00
Features: Use -std=c++17 for C++ 17 on GNU 8.0+
GNU 8 now documents official support for the `-std=c++17` flag.
This commit is contained in:
@@ -33,7 +33,10 @@ elseif (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.8)
|
||||
set(CMAKE_CXX14_EXTENSION_COMPILE_OPTION "-std=gnu++1y")
|
||||
endif()
|
||||
|
||||
if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.1)
|
||||
if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 8.0)
|
||||
set(CMAKE_CXX17_STANDARD_COMPILE_OPTION "-std=c++17")
|
||||
set(CMAKE_CXX17_EXTENSION_COMPILE_OPTION "-std=gnu++17")
|
||||
elseif (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.1)
|
||||
set(CMAKE_CXX17_STANDARD_COMPILE_OPTION "-std=c++1z")
|
||||
set(CMAKE_CXX17_EXTENSION_COMPILE_OPTION "-std=gnu++1z")
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user