diff options
author | Brad King <brad.king@kitware.com> | 2018-03-26 18:29:04 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2018-03-27 11:42:07 (GMT) |
commit | 7f295b1bd3c6f4b86ebf3711fa8d76cdaf4f51a5 (patch) | |
tree | be38b49b4eba05c3fd7f270192a7773e2c19c340 /Modules/Compiler | |
parent | 71cb8ce3a1e1c41ffcd43760609defc574d2a65b (diff) | |
download | CMake-7f295b1bd3c6f4b86ebf3711fa8d76cdaf4f51a5.zip CMake-7f295b1bd3c6f4b86ebf3711fa8d76cdaf4f51a5.tar.gz CMake-7f295b1bd3c6f4b86ebf3711fa8d76cdaf4f51a5.tar.bz2 |
Features: Activate C++ 20 support for Clang 5.0+
Diffstat (limited to 'Modules/Compiler')
-rw-r--r-- | Modules/Compiler/Clang-CXX.cmake | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/Modules/Compiler/Clang-CXX.cmake b/Modules/Compiler/Clang-CXX.cmake index 8e8ab4f..321ddf6 100644 --- a/Modules/Compiler/Clang-CXX.cmake +++ b/Modules/Compiler/Clang-CXX.cmake @@ -39,6 +39,11 @@ if(NOT "x${CMAKE_CXX_SIMULATE_ID}" STREQUAL "xMSVC") set(CMAKE_CXX17_STANDARD_COMPILE_OPTION "-std=c++1z") set(CMAKE_CXX17_EXTENSION_COMPILE_OPTION "-std=gnu++1z") endif() + + if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0) + set(CMAKE_CXX20_STANDARD_COMPILE_OPTION "-std=c++2a") + set(CMAKE_CXX20_EXTENSION_COMPILE_OPTION "-std=gnu++2a") + endif() else() # clang-cl does not know these options because it behaves like cl.exe set(CMAKE_CXX98_STANDARD_COMPILE_OPTION "") |