diff options
| author | ShifftC <[email protected]> | 2025-12-09 15:22:14 +0100 |
|---|---|---|
| committer | ShifftC <[email protected]> | 2025-12-09 15:22:14 +0100 |
| commit | d7787802f3ea77850958818e3bd827cd14b4d7dd (patch) | |
| tree | 68a29da9cd8c535c422ef77c5f46a188e5d2bd8c /xmake/rules/c++/precompiled_header/xmake.lua | |
| parent | 6921e40e00669f0f05a34ac9c802ba24abcb55b8 (diff) | |
skip pch build for compile commands
Diffstat (limited to 'xmake/rules/c++/precompiled_header/xmake.lua')
| -rw-r--r-- | xmake/rules/c++/precompiled_header/xmake.lua | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/xmake/rules/c++/precompiled_header/xmake.lua b/xmake/rules/c++/precompiled_header/xmake.lua index dc6fcb27e..a2b08fe46 100644 --- a/xmake/rules/c++/precompiled_header/xmake.lua +++ b/xmake/rules/c++/precompiled_header/xmake.lua @@ -23,7 +23,9 @@ rule("c.build.pcheader") import("private.action.build.pcheader").config(target, "c", opt) end) before_prepare(function (target, jobgraph, opt) - import("private.action.build.pcheader").build(target, jobgraph, "c", opt) + if not os.getenv("XMAKE_IN_COMPILE_COMMANDS_PROJECT_GENERATOR") then + import("private.action.build.pcheader").build(target, jobgraph, "c", opt) + end end, {jobgraph = true}) rule("c++.build.pcheader") @@ -32,6 +34,8 @@ rule("c++.build.pcheader") import("private.action.build.pcheader").config(target, "cxx", opt) end) before_prepare(function (target, jobgraph, opt) - import("private.action.build.pcheader").build(target, jobgraph, "cxx", opt) + if not os.getenv("XMAKE_IN_COMPILE_COMMANDS_PROJECT_GENERATOR") then + import("private.action.build.pcheader").build(target, jobgraph, "cxx", opt) + end end, {jobgraph = true}) |
