From b702e8e2257c259d5d4ab2ec1547057d525e03af Mon Sep 17 00:00:00 2001 From: Rolf Eike Beer Date: Sun, 3 Mar 2019 22:31:59 +0100 Subject: [PATCH] CMake: tell the Intel compiler to use the correct C/C++ standards Signed-off-by: Rolf Eike Beer --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0e5630c49..54ce2f11d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -95,7 +95,9 @@ elseif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") endif() 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") # using Visual Studio C++ endif()