summaryrefslogtreecommitdiffstats
path: root/Modules/Compiler/Clang-C.cmake
diff options
context:
space:
mode:
authorChuck Atkins <chuck.atkins@kitware.com>2017-05-01 17:02:19 (GMT)
committerChuck Atkins <chuck.atkins@kitware.com>2017-05-02 13:49:23 (GMT)
commit08fa2ba8d0682e0c9c307b572afbcee05cc93477 (patch)
tree38dbe1e99f3b3c6abacb8f391a0957cd0d9b1e55 /Modules/Compiler/Clang-C.cmake
parent0198502ff4fa3dec9cbd3249f6f458f53a8087f3 (diff)
downloadCMake-08fa2ba8d0682e0c9c307b572afbcee05cc93477.zip
CMake-08fa2ba8d0682e0c9c307b572afbcee05cc93477.tar.gz
CMake-08fa2ba8d0682e0c9c307b572afbcee05cc93477.tar.bz2
Clang: Use common compiler macros for language standard default
Diffstat (limited to 'Modules/Compiler/Clang-C.cmake')
-rw-r--r--Modules/Compiler/Clang-C.cmake16
1 files changed, 1 insertions, 15 deletions
diff --git a/Modules/Compiler/Clang-C.cmake b/Modules/Compiler/Clang-C.cmake
index bcd9218..b94087f 100644
--- a/Modules/Compiler/Clang-C.cmake
+++ b/Modules/Compiler/Clang-C.cmake
@@ -17,21 +17,7 @@ if(NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 3.4)
set(CMAKE_C11_EXTENSION_COMPILE_OPTION "-std=gnu11")
endif()
-if(NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 3.4)
- if (NOT CMAKE_C_COMPILER_FORCED)
- if (NOT CMAKE_C_STANDARD_COMPUTED_DEFAULT)
- message(FATAL_ERROR "CMAKE_C_STANDARD_COMPUTED_DEFAULT should be set for ${CMAKE_C_COMPILER_ID} (${CMAKE_C_COMPILER}) version ${CMAKE_C_COMPILER_VERSION}")
- endif()
- set(CMAKE_C_STANDARD_DEFAULT ${CMAKE_C_STANDARD_COMPUTED_DEFAULT})
- elseif(NOT DEFINED CMAKE_C_STANDARD_DEFAULT)
- # Compiler id was forced so just guess the default standard level.
- if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 3.6)
- set(CMAKE_C_STANDARD_DEFAULT 11)
- else()
- set(CMAKE_C_STANDARD_DEFAULT 99)
- endif()
- endif()
-endif()
+__compiler_check_default_language_standard(C 3.4 99 3.6 11)
macro(cmake_record_c_compile_features)
set(_result 0)