summaryrefslogtreecommitdiff
path: root/src/cmake/compiler
diff options
context:
space:
mode:
Diffstat (limited to 'src/cmake/compiler')
-rw-r--r--src/cmake/compiler/clang/settings.cmake6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/cmake/compiler/clang/settings.cmake b/src/cmake/compiler/clang/settings.cmake
index fecfb2edc4..b3eb165f60 100644
--- a/src/cmake/compiler/clang/settings.cmake
+++ b/src/cmake/compiler/clang/settings.cmake
@@ -3,6 +3,12 @@
# Copyright (C) 2008-2019 TrinityCore <https://www.trinitycore.org/>
#
+if ((USE_COREPCH OR USE_SCRIPTPCH) AND (CMAKE_C_COMPILER_LAUNCHER STREQUAL "ccache" OR CMAKE_CXX_COMPILER_LAUNCHER STREQUAL "ccache"))
+ message(STATUS "Clang: disable pch timestamp when ccache and pch enabled")
+ # TODO: for ccache https://github.com/ccache/ccache/issues/539
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Xclang -fno-pch-timestamp")
+endif()
+
# Set build-directive (used in core to tell which buildtype we used)
target_compile_definitions(acore-compile-option-interface
INTERFACE