فهرست منبع

Intel: Fix compiler C++98 standard flag on Windows

The Intel C++ Compiler for Windows does not support the `-Qstd=c++98`
flag but does support `-Qstd=gnu++98`.

Issue: #16384
Brad King 9 سال پیش
والد
کامیت
05e05cd2aa
1فایلهای تغییر یافته به همراه5 افزوده شده و 1 حذف شده
  1. 5 1
      Modules/Compiler/Intel-CXX.cmake

+ 5 - 1
Modules/Compiler/Intel-CXX.cmake

@@ -34,7 +34,11 @@ elseif (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 12.1)
 endif()
 
 if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 12.1)
-  set(CMAKE_CXX98_STANDARD_COMPILE_OPTION "${_std}=c++98")
+  if("x${CMAKE_CXX_SIMULATE_ID}" STREQUAL "xMSVC")
+    set(CMAKE_CXX98_STANDARD_COMPILE_OPTION "${_std}=gnu++98")
+  else()
+    set(CMAKE_CXX98_STANDARD_COMPILE_OPTION "${_std}=c++98")
+  endif()
   set(CMAKE_CXX98_EXTENSION_COMPILE_OPTION "${_std}=${_ext}98")
 endif()