summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-03-12 13:33:05 (GMT)
committerKitware Robot <kwrobot@kitware.com>2020-03-12 13:33:18 (GMT)
commitc852c0d1389321cea534dfd0354ece028bed88f3 (patch)
treeba0c06c7650c5be507f0f081f72fbbc60ca3f172 /Modules
parentd584d01103d6b7b129715352eb0e5f9e591f5342 (diff)
parenta67f2d00d82e69ec7af201d166a604b2926ac837 (diff)
downloadCMake-c852c0d1389321cea534dfd0354ece028bed88f3.zip
CMake-c852c0d1389321cea534dfd0354ece028bed88f3.tar.gz
CMake-c852c0d1389321cea534dfd0354ece028bed88f3.tar.bz2
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
Diffstat (limited to 'Modules')
-rw-r--r--Modules/Compiler/AppleClang-CXX.cmake5
-rw-r--r--Modules/Compiler/AppleClang-OBJCXX.cmake5
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()