summaryrefslogtreecommitdiffstats
path: root/Modules/Compiler/Clang.cmake
diff options
context:
space:
mode:
authorRaul Tambre <raul@tambre.ee>2020-06-13 08:26:11 (GMT)
committerRaul Tambre <raul@tambre.ee>2020-06-13 08:29:55 (GMT)
commitb365385d669d1a04cbc677cf2c7130c03bdea7e3 (patch)
tree1538f09d7afdf71a212cc35da9d06b3e05611026 /Modules/Compiler/Clang.cmake
parent5d26efe38f3ed5112788ac462b293809530acbce (diff)
downloadCMake-b365385d669d1a04cbc677cf2c7130c03bdea7e3.zip
CMake-b365385d669d1a04cbc677cf2c7130c03bdea7e3.tar.gz
CMake-b365385d669d1a04cbc677cf2c7130c03bdea7e3.tar.bz2
Clang: Record Clang 6.0+ as fully supporting C++17
Diffstat (limited to 'Modules/Compiler/Clang.cmake')
-rw-r--r--Modules/Compiler/Clang.cmake4
1 files changed, 4 insertions, 0 deletions
diff --git a/Modules/Compiler/Clang.cmake b/Modules/Compiler/Clang.cmake
index b84bdb2..bb516d3 100644
--- a/Modules/Compiler/Clang.cmake
+++ b/Modules/Compiler/Clang.cmake
@@ -146,6 +146,10 @@ macro(__compiler_clang_cxx_standards lang)
set(CMAKE_${lang}17_EXTENSION_COMPILE_OPTION "-std=gnu++1z")
endif()
+ if(NOT CMAKE_${lang}_COMPILER_VERSION VERSION_LESS 6.0)
+ set(CMAKE_${lang}17_STANDARD__HAS_FULL_SUPPORT ON)
+ endif()
+
if(NOT CMAKE_${lang}_COMPILER_VERSION VERSION_LESS 11.0)
set(CMAKE_${lang}20_STANDARD_COMPILE_OPTION "-std=c++20")
set(CMAKE_${lang}20_EXTENSION_COMPILE_OPTION "-std=gnu++20")