summaryrefslogtreecommitdiffstats
path: root/Modules/Compiler/Intel-C.cmake
diff options
context:
space:
mode:
authorChuck Atkins <chuck.atkins@kitware.com>2017-05-01 17:02:02 (GMT)
committerChuck Atkins <chuck.atkins@kitware.com>2017-05-02 13:49:23 (GMT)
commit0198502ff4fa3dec9cbd3249f6f458f53a8087f3 (patch)
tree053f20ebce538f7bb476e1cf7f528f96262cf891 /Modules/Compiler/Intel-C.cmake
parentd1aa2b3f607b35dc5dbf613b2334b6d243ec2bda (diff)
downloadCMake-0198502ff4fa3dec9cbd3249f6f458f53a8087f3.zip
CMake-0198502ff4fa3dec9cbd3249f6f458f53a8087f3.tar.gz
CMake-0198502ff4fa3dec9cbd3249f6f458f53a8087f3.tar.bz2
Intel: Use common compiler macros for language standard default
Diffstat (limited to 'Modules/Compiler/Intel-C.cmake')
-rw-r--r--Modules/Compiler/Intel-C.cmake18
1 files changed, 2 insertions, 16 deletions
diff --git a/Modules/Compiler/Intel-C.cmake b/Modules/Compiler/Intel-C.cmake
index 9c67fbd..d583dba 100644
--- a/Modules/Compiler/Intel-C.cmake
+++ b/Modules/Compiler/Intel-C.cmake
@@ -30,25 +30,11 @@ if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 12.0)
set(CMAKE_C99_EXTENSION_COMPILE_OPTION "${_std}=${_ext}99")
endif()
-if(NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 12.1)
- 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 15.0.0)
- set(CMAKE_C_STANDARD_DEFAULT 11)
- else()
- set(CMAKE_C_STANDARD_DEFAULT 90)
- endif()
- endif()
-endif()
-
unset(_std)
unset(_ext)
+__compiler_check_default_language_standard(C 12.1 90 15.0.0 11)
+
macro(cmake_record_c_compile_features)
set(_result 0)
if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 12.1)