summaryrefslogtreecommitdiff
path: root/xmake/modules
diff options
context:
space:
mode:
authorruki <[email protected]>2025-12-03 00:55:01 +0800
committerruki <[email protected]>2025-12-03 00:55:01 +0800
commit80a93765f31748434537a5a91fb10e8338ed4565 (patch)
tree26cb6dd452c5a107d7b3714a1536a8a8bb2d2c3e /xmake/modules
parentd326ec3fd56a0c13c7828ff70fa3cc6f88929123 (diff)
add project.policy_set
Diffstat (limited to 'xmake/modules')
-rw-r--r--xmake/modules/private/check/checkers/syntax.lua9
1 files changed, 4 insertions, 5 deletions
diff --git a/xmake/modules/private/check/checkers/syntax.lua b/xmake/modules/private/check/checkers/syntax.lua
index 8696ac3ae..35ae9da3d 100644
--- a/xmake/modules/private/check/checkers/syntax.lua
+++ b/xmake/modules/private/check/checkers/syntax.lua
@@ -21,7 +21,6 @@
-- imports
import("core.base.option")
import("core.base.task")
-import("core.project.config")
import("core.project.project")
import("actions.build.build_files", {rootdir = os.programdir(), alias = "build_files"})
import("actions.build.build", {rootdir = os.programdir(), alias = "build"})
@@ -129,18 +128,18 @@ function main(argv)
-- lock the whole project
project.lock()
- -- enable syntax-only policy and disable ccache via config
- config.set("policies", "build.c++.syntax_only,build.ccache:n")
-
-- config it first
task.run("config", {}, {disable_dump = true})
+ -- enable syntax-only policy and disable ccache
+ project.policy_set("build.c++.syntax_only", true)
+ project.policy_set("build.ccache", false)
+
-- enter project directory
local oldir = os.cd(project.directory())
-- validate targets before checking
if _validate_targets(args) then
- -- do check
_check(args)
end