[flang] [llvm] [CMake] Fix using precompiled headers with ccache (PR #131397)
Kajetan Puchalski via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 18 06:49:58 PDT 2025
================
@@ -291,7 +291,7 @@ if(LLVM_CCACHE_BUILD)
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ${CCACHE_PROGRAM})
else()
if(LLVM_CCACHE_MAXSIZE OR LLVM_CCACHE_DIR OR
- NOT LLVM_CCACHE_PARAMS MATCHES "CCACHE_CPP2=yes CCACHE_HASHDIR=yes")
+ NOT LLVM_CCACHE_PARAMS MATCHES "CCACHE_CPP2=yes CCACHE_HASHDIR=yes CCACHE_SLOPPINESS=pch_defines,time_macros")
----------------
mrkajetanp wrote:
Ah ok, we just need to be careful with the quoting. This works:
```
+ set(launcher ${CMAKE_COMMAND} -E env ${launcher_env} ${CCACHE_PROGRAM})
+ set(CMAKE_C_COMPILER_LAUNCHER ${launcher})
+ set(CMAKE_CXX_COMPILER_LAUNCHER ${launcher})
```
https://github.com/llvm/llvm-project/pull/131397
More information about the llvm-commits
mailing list