diff options
| author | ruki <[email protected]> | 2020-02-23 13:00:30 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2020-02-23 13:00:30 +0800 |
| commit | 7256d0db4d567be5a67b76e38e275849578f74a0 (patch) | |
| tree | e190fd03740f7e2adb9eaf080ed39d05e50cf069 | |
| parent | 9d34862fe5c82c7ac7e8d6dd8a1d951b3f1ed46c (diff) | |
improve to get ccache for build.ninja
| -rw-r--r-- | xmake/plugins/project/ninja/build_ninja.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/xmake/plugins/project/ninja/build_ninja.lua b/xmake/plugins/project/ninja/build_ninja.lua index f46730e22..972f7c534 100644 --- a/xmake/plugins/project/ninja/build_ninja.lua +++ b/xmake/plugins/project/ninja/build_ninja.lua @@ -47,7 +47,7 @@ end -- add rules for complier (gcc) function _add_rules_for_compiler_gcc(ninjafile, sourcekind, program) - local ccache = find_tool("ccache") + local ccache = config.get("ccache") ~= false and find_tool("ccache") ninjafile:print("rule %s", sourcekind) ninjafile:print(" command = %s%s $ARGS -MMD -MF $out.d -o $out -c $in", ccache and (ccache.program .. " ") or "", program) ninjafile:print(" deps = gcc") |
