diff options
Diffstat (limited to 'xmake/rules/c++/precompiled_header/xmake.lua')
| -rw-r--r-- | xmake/rules/c++/precompiled_header/xmake.lua | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/xmake/rules/c++/precompiled_header/xmake.lua b/xmake/rules/c++/precompiled_header/xmake.lua index d67535cc6..8bfdd09dd 100644 --- a/xmake/rules/c++/precompiled_header/xmake.lua +++ b/xmake/rules/c++/precompiled_header/xmake.lua @@ -20,7 +20,10 @@ rule("c.build.pcheader") on_config(function (target, opt) - import("private.action.build.pcheader").config(target, "c", opt) + import("private.action.build.pcheader") + if not pcheader.config(target, "c", opt) then + target:rule_enable("c.build.pcheader", false) + end end) before_build(function (target, jobgraph, opt) @@ -31,7 +34,10 @@ rule("c.build.pcheader") rule("c++.build.pcheader") on_config(function (target, opt) - import("private.action.build.pcheader").config(target, "cxx", opt) + import("private.action.build.pcheader") + if not pcheader.config(target, "cxx", opt) then + target:rule_enable("c++.build.pcheader", false) + end end) -- If the current target has a C++ modules file, |
