summaryrefslogtreecommitdiff
path: root/xmake/scripts/action/_clean.lua
diff options
context:
space:
mode:
Diffstat (limited to 'xmake/scripts/action/_clean.lua')
-rw-r--r--xmake/scripts/action/_clean.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/xmake/scripts/action/_clean.lua b/xmake/scripts/action/_clean.lua
index 2a479157f..31b5209d3 100644
--- a/xmake/scripts/action/_clean.lua
+++ b/xmake/scripts/action/_clean.lua
@@ -26,6 +26,7 @@ local _clean = _clean or {}
-- load modules
local clean = require("base/clean")
local config = require("base/config")
+local project = require("base/project")
local platform = require("platform/platform")
-- done the given config
@@ -35,6 +36,11 @@ function _clean.done()
local options = xmake._OPTIONS
assert(options)
+ -- check target
+ if not project.checktarget(options.target) then
+ return false
+ end
+
-- clean the current target
if not clean.remove(options.target) then
return false