summaryrefslogtreecommitdiffstats
path: root/Modules/Compiler/AppleClang-C.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/Compiler/AppleClang-C.cmake')
-rw-r--r--Modules/Compiler/AppleClang-C.cmake5
1 files changed, 4 insertions, 1 deletions
diff --git a/Modules/Compiler/AppleClang-C.cmake b/Modules/Compiler/AppleClang-C.cmake
index 10454f6..1db7d9e 100644
--- a/Modules/Compiler/AppleClang-C.cmake
+++ b/Modules/Compiler/AppleClang-C.cmake
@@ -13,7 +13,10 @@ if(NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.0)
endif()
if(NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 4.0)
- set(CMAKE_C_STANDARD_DEFAULT 99)
+ 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})
endif()
macro(cmake_record_c_compile_features)