diff options
author | Robert Maynard <robert.maynard@kitware.com> | 2020-05-22 14:40:50 (GMT) |
---|---|---|
committer | Robert Maynard <robert.maynard@kitware.com> | 2020-06-09 20:20:53 (GMT) |
commit | 457170a476ca3ff3b5db80360a7fd8202ac31e91 (patch) | |
tree | 78adc113adb78835fc91e7e29a1b7713abc8a756 /Modules/Compiler/Clang-CXX.cmake | |
parent | 644d3b86ebb4be108172765e96251162e2537344 (diff) | |
download | CMake-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/Clang-CXX.cmake')
-rw-r--r-- | Modules/Compiler/Clang-CXX.cmake | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Modules/Compiler/Clang-CXX.cmake b/Modules/Compiler/Clang-CXX.cmake index 789e991..311d2b0 100644 --- a/Modules/Compiler/Clang-CXX.cmake +++ b/Modules/Compiler/Clang-CXX.cmake @@ -2,7 +2,9 @@ include(Compiler/Clang) __compiler_clang(CXX) __compiler_clang_cxx_standards(CXX) + if("x${CMAKE_CXX_COMPILER_FRONTEND_VARIANT}" STREQUAL "xGNU") + set(CMAKE_CXX_COMPILE_OPTIONS_EXPLICIT_LANGUAGE -x c++) set(CMAKE_CXX_COMPILE_OPTIONS_VISIBILITY_INLINES_HIDDEN "-fvisibility-inlines-hidden") endif() |