summaryrefslogtreecommitdiffstats
path: root/Modules/Compiler/AppleClang-CXX.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/Compiler/AppleClang-CXX.cmake')
-rw-r--r--Modules/Compiler/AppleClang-CXX.cmake8
1 files changed, 8 insertions, 0 deletions
diff --git a/Modules/Compiler/AppleClang-CXX.cmake b/Modules/Compiler/AppleClang-CXX.cmake
index 15edc21..5282077 100644
--- a/Modules/Compiler/AppleClang-CXX.cmake
+++ b/Modules/Compiler/AppleClang-CXX.cmake
@@ -2,6 +2,14 @@ include(Compiler/Clang)
__compiler_clang(CXX)
if(NOT "x${CMAKE_CXX_SIMULATE_ID}" STREQUAL "xMSVC")
+ if((NOT DEFINED CMAKE_DEPENDS_USE_COMPILER OR CMAKE_DEPENDS_USE_COMPILER)
+ AND CMAKE_GENERATOR MATCHES "Makefiles"
+ AND CMAKE_DEPFILE_FLAGS_CXX)
+ # dependencies are computed by the compiler itself
+ set(CMAKE_CXX_DEPFILE_FORMAT gcc)
+ set(CMAKE_CXX_DEPENDS_USE_COMPILER TRUE)
+ endif()
+
set(CMAKE_CXX_COMPILE_OPTIONS_VISIBILITY_INLINES_HIDDEN "-fvisibility-inlines-hidden")
endif()