From 1f82be4455b060718cd8ff5c67f97ccafe97ab61 Mon Sep 17 00:00:00 2001 From: ruki Date: Wed, 25 May 2022 22:26:51 +0800 Subject: disable precompiled in project --- xmake/modules/private/action/require/impl/package.lua | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/xmake/modules/private/action/require/impl/package.lua b/xmake/modules/private/action/require/impl/package.lua index 04557715c..689f9805c 100644 --- a/xmake/modules/private/action/require/impl/package.lua +++ b/xmake/modules/private/action/require/impl/package.lua @@ -675,10 +675,14 @@ end -- select to use precompiled artifacts? function _select_artifacts(package, artifacts_manifest) - -- the precompile policy is disabled? + -- the precompile policy is disabled in package? if package:policy("package.precompiled") == false then return end + -- the precompile policy is disabled in project? + if os.isfile(os.projectfile()) and project.policy("package.precompiled") == false then + return + end local artifacts_info if package:is_plat("windows") then -- for msvc artifacts_info = _select_artifacts_for_msvc(package, artifacts_manifest) -- cgit v1.3.1