mirror of
https://github.com/reactos/CMake.git
synced 2025-01-26 13:57:07 +00:00
Intel: Use common compiler macros for language standard default
This commit is contained in:
parent
d1aa2b3f60
commit
0198502ff4
@ -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)
|
||||
|
@ -47,22 +47,11 @@ if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 12.1)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 12.1)
|
||||
if (NOT CMAKE_CXX_COMPILER_FORCED)
|
||||
if (NOT CMAKE_CXX_STANDARD_COMPUTED_DEFAULT)
|
||||
message(FATAL_ERROR "CMAKE_CXX_STANDARD_COMPUTED_DEFAULT should be set for ${CMAKE_CXX_COMPILER_ID} (${CMAKE_CXX_COMPILER}) version ${CMAKE_CXX_COMPILER_VERSION}")
|
||||
else()
|
||||
set(CMAKE_CXX_STANDARD_DEFAULT ${CMAKE_CXX_STANDARD_COMPUTED_DEFAULT})
|
||||
endif()
|
||||
elseif (NOT CMAKE_CXX_STANDARD_COMPUTED_DEFAULT)
|
||||
# Compiler id was forced so just guess the default standard level.
|
||||
set(CMAKE_CXX_STANDARD_DEFAULT 98)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
unset(_std)
|
||||
unset(_ext)
|
||||
|
||||
__compiler_check_default_language_standard(CXX 12.1 98)
|
||||
|
||||
macro(cmake_record_cxx_compile_features)
|
||||
set(_result 0)
|
||||
if(NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 12.1)
|
||||
|
@ -8,6 +8,8 @@ if(__COMPILER_INTEL)
|
||||
endif()
|
||||
set(__COMPILER_INTEL 1)
|
||||
|
||||
include(Compiler/CMakeCommonCompilerMacros)
|
||||
|
||||
if(CMAKE_HOST_WIN32)
|
||||
# MSVC-like
|
||||
macro(__compiler_intel lang)
|
||||
|
Loading…
x
Reference in New Issue
Block a user