diff options
| author | ruki <[email protected]> | 2024-12-03 10:15:52 +0800 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-12-03 10:15:52 +0800 |
| commit | fcabe5855eed5daa8e134e91da17c6acf40f5db0 (patch) | |
| tree | a0652f175c45d35af2a77297ffa28cda0fa2bf54 /xmake/modules/package | |
| parent | 46ec7f87125cd7824c9ad7b1256693b575f0c576 (diff) | |
| parent | d9bc6250c4cab08285cbeab73293886527098f14 (diff) | |
Merge pull request #5919 from star-hengxing/ccache
Use ccache when debug cmake package
Diffstat (limited to 'xmake/modules/package')
| -rw-r--r-- | xmake/modules/package/tools/cmake.lua | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/xmake/modules/package/tools/cmake.lua b/xmake/modules/package/tools/cmake.lua index b0bc9f34d..6d7f15dce 100644 --- a/xmake/modules/package/tools/cmake.lua +++ b/xmake/modules/package/tools/cmake.lua @@ -952,6 +952,13 @@ function _get_configs(package, configs, opt) end end _insert_configs_from_envs(configs, envs or {}, opt) + + local ccache = package:data("ccache") + if ccache then + table.insert(configs, "-DCMAKE_C_COMPILER_LAUNCHER=" .. ccache) + table.insert(configs, "-DCMAKE_CXX_COMPILER_LAUNCHER=" .. ccache) + end + return configs end |
