Merge topic 'apple-clang-flags-c++17' into release-3.17

a67f2d00d8 Apple Clang: add flags for C++17 standard

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4468
This commit is contained in:
Brad King 2020-03-12 13:33:05 +00:00 committed by Kitware Robot
commit c852c0d138
2 changed files with 8 additions and 2 deletions

View File

@ -25,7 +25,10 @@ elseif(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.1)
set(CMAKE_CXX14_STANDARD__HAS_FULL_SUPPORT ON)
endif()
if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 6.1)
if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 10.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 6.1)
set(CMAKE_CXX17_STANDARD_COMPILE_OPTION "-std=c++1z")
set(CMAKE_CXX17_EXTENSION_COMPILE_OPTION "-std=gnu++1z")
endif()

View File

@ -22,7 +22,10 @@ elseif(NOT CMAKE_OBJCXX_COMPILER_VERSION VERSION_LESS 5.1)
set(CMAKE_OBJCXX14_STANDARD__HAS_FULL_SUPPORT ON)
endif()
if (NOT CMAKE_OBJCXX_COMPILER_VERSION VERSION_LESS 6.1)
if (NOT CMAKE_OBJCXX_COMPILER_VERSION VERSION_LESS 10.0)
set(CMAKE_OBJCXX17_STANDARD_COMPILE_OPTION "-std=c++17")
set(CMAKE_OBJCXX17_EXTENSION_COMPILE_OPTION "-std=gnu++17")
elseif (NOT CMAKE_OBJCXX_COMPILER_VERSION VERSION_LESS 6.1)
set(CMAKE_OBJCXX17_STANDARD_COMPILE_OPTION "-std=c++1z")
set(CMAKE_OBJCXX17_EXTENSION_COMPILE_OPTION "-std=gnu++1z")
endif()