summaryrefslogtreecommitdiffstats
path: root/Modules/Compiler/AppleClang-CXX.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-06-11 11:47:22 (GMT)
committerKitware Robot <kwrobot@kitware.com>2020-06-11 11:47:30 (GMT)
commit7925279c20754113227202848545804cde30a3b6 (patch)
treeb75b99ea7e7967316504507da253526c9971d9c8 /Modules/Compiler/AppleClang-CXX.cmake
parentd264270307872ca9c7ea0ea4a02ebc300ef86492 (diff)
parent74b1c9fc8e8b33c8faa9aadf6ce09c15d94ea011 (diff)
downloadCMake-7925279c20754113227202848545804cde30a3b6.zip
CMake-7925279c20754113227202848545804cde30a3b6.tar.gz
CMake-7925279c20754113227202848545804cde30a3b6.tar.bz2
Merge topic 'add_explicit_lang_flag_to_compile_object_rule'
74b1c9fc8e Explicitly specify language flag when source LANGUAGE property is set 457170a476 CXX: Compile when possible with explicit `Cxx` language flag set 644d3b86eb C: Compile when possible with explicit `C` language flag set Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4780
Diffstat (limited to 'Modules/Compiler/AppleClang-CXX.cmake')
-rw-r--r--Modules/Compiler/AppleClang-CXX.cmake2
1 files changed, 2 insertions, 0 deletions
diff --git a/Modules/Compiler/AppleClang-CXX.cmake b/Modules/Compiler/AppleClang-CXX.cmake
index 15edc21..611c674 100644
--- a/Modules/Compiler/AppleClang-CXX.cmake
+++ b/Modules/Compiler/AppleClang-CXX.cmake
@@ -1,6 +1,8 @@
include(Compiler/Clang)
__compiler_clang(CXX)
+set(CMAKE_CXX_COMPILE_OPTIONS_EXPLICIT_LANGUAGE -x c++)
+
if(NOT "x${CMAKE_CXX_SIMULATE_ID}" STREQUAL "xMSVC")
set(CMAKE_CXX_COMPILE_OPTIONS_VISIBILITY_INLINES_HIDDEN "-fvisibility-inlines-hidden")
endif()