summaryrefslogtreecommitdiff
path: root/xmake/core/project/project.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2016-06-03 13:59:39 +0800
committerruki <[email protected]>2016-06-03 13:59:39 +0800
commit9bd25eacb780c89b0cf9968160e21399ef3872a5 (patch)
treebe50054c8913a9ee46e79ca2b0fbc4e98aa2707d /xmake/core/project/project.lua
parent122683f02a9d0168f3c68b730f42d657c5a3a8ff (diff)
fix option enable bug
Diffstat (limited to 'xmake/core/project/project.lua')
-rw-r--r--xmake/core/project/project.lua14
1 files changed, 11 insertions, 3 deletions
diff --git a/xmake/core/project/project.lua b/xmake/core/project/project.lua
index 6e326add7..fb32e3623 100644
--- a/xmake/core/project/project.lua
+++ b/xmake/core/project/project.lua
@@ -556,8 +556,9 @@ function project.check()
-- need check?
if config.get(name) == nil then
- -- check option
- if opt:check(cfile, cxxfile, objectfile, targetfile) then
+ -- enable it?
+ local enable = opt:get("enable")
+ if enable ~= nil and enable then
-- enable this option
config.set(name, true)
@@ -565,6 +566,14 @@ function project.check()
-- save this option to configure
opt:save()
+ -- check option
+ elseif enable == nil and opt:check(cfile, cxxfile, objectfile, targetfile) then
+
+ -- enable this option
+ config.set(name, true)
+
+ -- save this option to configure
+ opt:save()
else
-- disable this option
@@ -572,7 +581,6 @@ function project.check()
-- clear this option to configure
opt:clear()
-
end
-- no check