summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2018-09-19 23:57:43 +0800
committerruki <[email protected]>2018-09-19 17:46:22 +0800
commit739a7a39c368a78f775a8988fd392eb9347a494e (patch)
tree0dd3f21ad5594ae2003b64c08a3d31db614309ae
parentbc71d4f29362e0af30fb7446d1d71059acf4ba5b (diff)
disable to build target
-rw-r--r--xmake/actions/build/build.lua15
1 files changed, 15 insertions, 0 deletions
diff --git a/xmake/actions/build/build.lua b/xmake/actions/build/build.lua
index e440a544a..be9559128 100644
--- a/xmake/actions/build/build.lua
+++ b/xmake/actions/build/build.lua
@@ -39,6 +39,11 @@ end
-- on build the given target
function _on_build_target(target)
+ -- has been disabled?
+ if target:get("enabled") == false then
+ return
+ end
+
-- build target with rules
local done = false
for _, r in ipairs(target:orderules()) do
@@ -64,6 +69,11 @@ function _build_target(target)
{
function (target)
+ -- has been disabled?
+ if target:get("enabled") == false then
+ return
+ end
+
-- get progress
local progress = _g.targetindex * 100 / _g.targetcount
@@ -84,6 +94,11 @@ function _build_target(target)
, target:script("build", _on_build_target)
, function (target)
+ -- has been disabled?
+ if target:get("enabled") == false then
+ return
+ end
+
-- get progress
local progress = (_g.targetindex + 1) * 100 / _g.targetcount