Skip to content

Commit 6edd33b

Browse files
committed
[CMake] Disable precompiled headers for ccache builds on Windows
Signed-off-by: Kajetan Puchalski <kajetan.puchalski@arm.com>
1 parent cd8c8cc commit 6edd33b

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

llvm/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -286,6 +286,9 @@ if(LLVM_CCACHE_BUILD)
286286
endif()
287287
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ${CCACHE_PROGRAM})
288288
else()
289+
# Until a way to reliably configure ccache on Windows is found,
290+
# disable precompiled headers for Windows + ccache builds
291+
set(CMAKE_DISABLE_PRECOMPILE_HEADERS "ON")
289292
if(LLVM_CCACHE_MAXSIZE OR LLVM_CCACHE_DIR OR
290293
NOT LLVM_CCACHE_PARAMS MATCHES "CCACHE_CPP2=yes CCACHE_HASHDIR=yes CCACHE_SLOPPINESS=pch_defines,time_macros")
291294
message(FATAL_ERROR "Ccache configuration through CMake is not supported on Windows. Please use environment variables.")

0 commit comments

Comments
 (0)