summaryrefslogtreecommitdiffstats
path: root/Modules/Compiler/XLClang-CXX.cmake
diff options
context:
space:
mode:
authorRobert Maynard <robert.maynard@kitware.com>2020-05-22 14:40:50 (GMT)
committerRobert Maynard <robert.maynard@kitware.com>2020-06-09 20:20:53 (GMT)
commit457170a476ca3ff3b5db80360a7fd8202ac31e91 (patch)
tree78adc113adb78835fc91e7e29a1b7713abc8a756 /Modules/Compiler/XLClang-CXX.cmake
parent644d3b86ebb4be108172765e96251162e2537344 (diff)
downloadCMake-457170a476ca3ff3b5db80360a7fd8202ac31e91.zip
CMake-457170a476ca3ff3b5db80360a7fd8202ac31e91.tar.gz
CMake-457170a476ca3ff3b5db80360a7fd8202ac31e91.tar.bz2
CXX: Compile when possible with explicit `Cxx` language flag set
Issue: #14516, #20716
Diffstat (limited to 'Modules/Compiler/XLClang-CXX.cmake')
-rw-r--r--Modules/Compiler/XLClang-CXX.cmake2
1 files changed, 2 insertions, 0 deletions
diff --git a/Modules/Compiler/XLClang-CXX.cmake b/Modules/Compiler/XLClang-CXX.cmake
index 9ea3d7c..02638c7 100644
--- a/Modules/Compiler/XLClang-CXX.cmake
+++ b/Modules/Compiler/XLClang-CXX.cmake
@@ -1,6 +1,8 @@
include(Compiler/XLClang)
__compiler_xlclang(CXX)
+set(CMAKE_CXX_COMPILE_OPTIONS_EXPLICIT_LANGUAGE -x c++)
+
if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 13.1.1)
set(CMAKE_CXX98_STANDARD_COMPILE_OPTION "")
set(CMAKE_CXX98_EXTENSION_COMPILE_OPTION "")