summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/CMakeLists.txt
diff options
context:
space:
mode:
authorRaul Tambre <raul@tambre.ee>2021-02-06 16:25:47 (GMT)
committerRaul Tambre <raul@tambre.ee>2021-02-25 16:22:29 (GMT)
commit82239d43f8020cb50f03bf658e97c81afb611b9a (patch)
tree918b8e58ac624806776275f3cca55855fa17385f /Tests/RunCMake/CMakeLists.txt
parent9024fb632eb236727d057f6d9f98e2b3b30df212 (diff)
downloadCMake-82239d43f8020cb50f03bf658e97c81afb611b9a.zip
CMake-82239d43f8020cb50f03bf658e97c81afb611b9a.tar.gz
CMake-82239d43f8020cb50f03bf658e97c81afb611b9a.tar.bz2
Clang: C17 default version
Switched in LLVM commit 91cdbd521a38495c66e30636943563ca70d3c022, released in Clang 11. Issue: #17755
Diffstat (limited to 'Tests/RunCMake/CMakeLists.txt')
-rw-r--r--Tests/RunCMake/CMakeLists.txt4
1 files changed, 3 insertions, 1 deletions
diff --git a/Tests/RunCMake/CMakeLists.txt b/Tests/RunCMake/CMakeLists.txt
index 5f8ff42..354a04e 100644
--- a/Tests/RunCMake/CMakeLists.txt
+++ b/Tests/RunCMake/CMakeLists.txt
@@ -420,7 +420,9 @@ function(add_RunCMake_test_try_compile)
if(CMAKE_VERSION VERSION_LESS 3.20.20210225 AND "x${CMAKE_C_COMPILER_ID}" STREQUAL "xClang")
# Older CMake versions do not know about Clang MSVC compatibility mode
# standards. Approximate the logic from Clang-C.cmake.
- if(CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 3.5.2)
+ if(CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 11.0)
+ set(CMAKE_C_STANDARD_DEFAULT 17)
+ elseif(CMAKE_C_COMPILER_VERSION VERSION_GREATER_EQUAL 3.5.2)
set(CMAKE_C_STANDARD_DEFAULT 11)
endif()
endif()