diff options
author | Brad King <brad.king@kitware.com> | 2020-03-12 13:33:05 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2020-03-12 13:33:19 (GMT) |
commit | 2ca34f0685dece636f53a5e1563bc4ad415a07f9 (patch) | |
tree | 8e215745f7eb179200b46db25cec03b11dcbcc42 /Modules | |
parent | 0cf40eec641801e9927a9f479120f74a52ce2970 (diff) | |
parent | a67f2d00d82e69ec7af201d166a604b2926ac837 (diff) | |
download | CMake-2ca34f0685dece636f53a5e1563bc4ad415a07f9.zip CMake-2ca34f0685dece636f53a5e1563bc4ad415a07f9.tar.gz CMake-2ca34f0685dece636f53a5e1563bc4ad415a07f9.tar.bz2 |
Merge topic 'apple-clang-flags-c++17'
a67f2d00d8 Apple Clang: add flags for C++17 standard
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !4468
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/Compiler/AppleClang-CXX.cmake | 5 | ||||
-rw-r--r-- | Modules/Compiler/AppleClang-OBJCXX.cmake | 5 |
2 files changed, 8 insertions, 2 deletions
diff --git a/Modules/Compiler/AppleClang-CXX.cmake b/Modules/Compiler/AppleClang-CXX.cmake index 3fa6990..15edc21 100644 --- a/Modules/Compiler/AppleClang-CXX.cmake +++ b/Modules/Compiler/AppleClang-CXX.cmake @@ -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() diff --git a/Modules/Compiler/AppleClang-OBJCXX.cmake b/Modules/Compiler/AppleClang-OBJCXX.cmake index 2c084af..409bd4a 100644 --- a/Modules/Compiler/AppleClang-OBJCXX.cmake +++ b/Modules/Compiler/AppleClang-OBJCXX.cmake @@ -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() |