diff options
author | Marc Chevrier <marc.chevrier@gmail.com> | 2020-03-12 09:55:58 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2020-03-12 12:09:12 (GMT) |
commit | a67f2d00d82e69ec7af201d166a604b2926ac837 (patch) | |
tree | f0832b6529b82d7613617e5e9b382f97300518d7 /Modules/Compiler/AppleClang-OBJCXX.cmake | |
parent | dd45b7b429ee70adfbaa522e42b9e51afcd1522d (diff) | |
download | CMake-a67f2d00d82e69ec7af201d166a604b2926ac837.zip CMake-a67f2d00d82e69ec7af201d166a604b2926ac837.tar.gz CMake-a67f2d00d82e69ec7af201d166a604b2926ac837.tar.bz2 |
Apple Clang: add flags for C++17 standard
Diffstat (limited to 'Modules/Compiler/AppleClang-OBJCXX.cmake')
-rw-r--r-- | Modules/Compiler/AppleClang-OBJCXX.cmake | 5 |
1 files changed, 4 insertions, 1 deletions
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() |