diff options
Diffstat (limited to 'Modules/Compiler/Intel-C.cmake')
-rw-r--r-- | Modules/Compiler/Intel-C.cmake | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/Modules/Compiler/Intel-C.cmake b/Modules/Compiler/Intel-C.cmake index 6e07436..eb9602a 100644 --- a/Modules/Compiler/Intel-C.cmake +++ b/Modules/Compiler/Intel-C.cmake @@ -8,18 +8,22 @@ set(CMAKE_C_FLAGS_RELWITHDEBINFO_INIT "-O2 -g -DNDEBUG") set(CMAKE_DEPFILE_FLAGS_C "-MD -MT <OBJECT> -MF <DEPFILE>") -if(NOT "x${CMAKE_C_SIMULATE_ID}" STREQUAL "xMSVC") - if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 15.0.0) - set(CMAKE_C11_STANDARD_COMPILE_OPTION "-std=c11") - set(CMAKE_C11_EXTENSION_COMPILE_OPTION "-std=c11") - endif() +if("x${CMAKE_C_SIMULATE_ID}" STREQUAL "xMSVC") + set(_std -Qstd) +else() + set(_std -std) +endif() - if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 12.1) - set(CMAKE_C90_STANDARD_COMPILE_OPTION "-std=c89") - set(CMAKE_C90_EXTENSION_COMPILE_OPTION "-std=c89") - set(CMAKE_C99_STANDARD_COMPILE_OPTION "-std=c99") - set(CMAKE_C99_EXTENSION_COMPILE_OPTION "-std=c99") - endif() +if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 15.0.0) + set(CMAKE_C11_STANDARD_COMPILE_OPTION "${_std}=c11") + set(CMAKE_C11_EXTENSION_COMPILE_OPTION "${_std}=c11") +endif() + +if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 12.1) + set(CMAKE_C90_STANDARD_COMPILE_OPTION "${_std}=c89") + set(CMAKE_C90_EXTENSION_COMPILE_OPTION "${_std}=c89") + set(CMAKE_C99_STANDARD_COMPILE_OPTION "${_std}=c99") + set(CMAKE_C99_EXTENSION_COMPILE_OPTION "${_std}=c99") endif() if(NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 12.1) @@ -38,6 +42,8 @@ if(NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 12.1) endif() endif() +unset(_std) + macro(cmake_record_c_compile_features) macro(_get_intel_c_features std_version list) record_compiler_features(C "${std_version}" ${list}) |