summaryrefslogtreecommitdiff
path: root/Modules/Compiler/Intel-CXX.cmake
diff options
context:
space:
mode:
authorRobert Maynard <robert.maynard@kitware.com>2020-05-22 10:40:50 -0400
committerRobert Maynard <robert.maynard@kitware.com>2020-06-09 16:20:53 -0400
commit457170a476ca3ff3b5db80360a7fd8202ac31e91 (patch)
tree78adc113adb78835fc91e7e29a1b7713abc8a756 /Modules/Compiler/Intel-CXX.cmake
parent644d3b86ebb4be108172765e96251162e2537344 (diff)
downloadcmake-457170a476ca3ff3b5db80360a7fd8202ac31e91.tar.gz
CXX: Compile when possible with explicit `Cxx` language flag set
Issue: #14516, #20716
Diffstat (limited to 'Modules/Compiler/Intel-CXX.cmake')
-rw-r--r--Modules/Compiler/Intel-CXX.cmake2
1 files changed, 2 insertions, 0 deletions
diff --git a/Modules/Compiler/Intel-CXX.cmake b/Modules/Compiler/Intel-CXX.cmake
index 1ed1b08f3e..47d5672f2e 100644
--- a/Modules/Compiler/Intel-CXX.cmake
+++ b/Modules/Compiler/Intel-CXX.cmake
@@ -37,6 +37,8 @@ if("x${CMAKE_CXX_SIMULATE_ID}" STREQUAL "xMSVC")
else()
+ set(CMAKE_CXX_COMPILE_OPTIONS_EXPLICIT_LANGUAGE -x c++)
+
if (NOT CMAKE_CXX_COMPILER_VERSION VERSION_LESS 18.0.0)
set(CMAKE_CXX17_STANDARD_COMPILE_OPTION "-std=c++17")
set(CMAKE_CXX17_EXTENSION_COMPILE_OPTION "-std=gnu++17")