diff options
author | Brad King <brad.king@kitware.com> | 2017-01-31 13:31:41 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2017-02-01 13:55:50 (GMT) |
commit | 5d70894d4086b1800b31d2d51f2ac3a124d7eed0 (patch) | |
tree | 6c2fbaa17e1edab7c1d5514a0c97c8cf6a158033 /Modules/Compiler | |
parent | 07d3695e75d1bbeaa571901708350efc3f936e0e (diff) | |
download | CMake-5d70894d4086b1800b31d2d51f2ac3a124d7eed0.zip CMake-5d70894d4086b1800b31d2d51f2ac3a124d7eed0.tar.gz CMake-5d70894d4086b1800b31d2d51f2ac3a124d7eed0.tar.bz2 |
Features: Update version of Intel Compiler on Windows supporting C 11
The Intel Compiler 15.0.0 on Windows does not support `-Qstd=c11`.
Bump our version requirement to 16 to use that flag.
Diffstat (limited to 'Modules/Compiler')
-rw-r--r-- | Modules/Compiler/Intel-C.cmake | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/Modules/Compiler/Intel-C.cmake b/Modules/Compiler/Intel-C.cmake index 6408392..9c67fbd 100644 --- a/Modules/Compiler/Intel-C.cmake +++ b/Modules/Compiler/Intel-C.cmake @@ -10,14 +10,17 @@ set(CMAKE_DEPFILE_FLAGS_C "-MD -MT <OBJECT> -MF <DEPFILE>") if("x${CMAKE_C_SIMULATE_ID}" STREQUAL "xMSVC") set(_std -Qstd) set(_ext c) + if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 16.0.0) + set(CMAKE_C11_STANDARD_COMPILE_OPTION "-Qstd=c11") + set(CMAKE_C11_EXTENSION_COMPILE_OPTION "-Qstd=c11") + endif() else() set(_std -std) set(_ext gnu) -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}=${_ext}11") + 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=gnu11") + endif() endif() if (NOT CMAKE_C_COMPILER_VERSION VERSION_LESS 12.0) |