CMake: tell the Intel compiler to use the correct C/C++ standards

Signed-off-by: Rolf Eike Beer <eike@sf-mail.de>
This commit is contained in:
Rolf Eike Beer 2019-03-03 22:31:59 +01:00 committed by Dirk Hohndel
parent 47e9a771ba
commit b702e8e225

View file

@ -95,7 +95,9 @@ elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
endif() endif()
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "Intel") elseif (CMAKE_CXX_COMPILER_ID STREQUAL "Intel")
# using Intel C++ # works only for CMake 3.1 and later
set(CMAKE_C_STANDARD 99)
set(CMAKE_CXX_STANDARD 11)
elseif (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") elseif (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC")
# using Visual Studio C++ # using Visual Studio C++
endif() endif()