summaryrefslogtreecommitdiff
path: root/xmake/core/base/project.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2016-01-22 16:04:14 +0800
committerruki <[email protected]>2016-02-15 19:10:25 +0800
commit01c9855cd384bf20c17452e8ce790ad049ea4e4f (patch)
tree240c4f3c24a2411f6c442ee2e70a3c759f093230 /xmake/core/base/project.lua
parent7aac238641926dfc0386e8be78958a63e0866c19 (diff)
fix merge root values bug for interpreter
Diffstat (limited to 'xmake/core/base/project.lua')
-rw-r--r--xmake/core/base/project.lua50
1 files changed, 25 insertions, 25 deletions
diff --git a/xmake/core/base/project.lua b/xmake/core/base/project.lua
index d0d9cb4c8..3981de2c0 100644
--- a/xmake/core/base/project.lua
+++ b/xmake/core/base/project.lua
@@ -192,15 +192,15 @@ function project._api_add_cfuncs(interp, module, links, includes, ...)
end
-- make option
- self:api_call("add_option", name)
- self:api_call("set_option_category", "cfuncs")
- self:api_call("add_option_cfuncs", cfunc)
- if links then self:api_call("add_option_links", links) end
- if includes then self:api_call("add_option_cincludes", includes) end
- self:api_call("add_option_defines_h_if_ok", define)
+ interp:api_call("add_option", name)
+ interp:api_call("set_option_category", "cfuncs")
+ interp:api_call("add_option_cfuncs", cfunc)
+ if links then interp:api_call("add_option_links", links) end
+ if includes then interp:api_call("add_option_cincludes", includes) end
+ interp:api_call("add_option_defines_h_if_ok", define)
-- add this option
- self:api_call("add_options", name)
+ interp:api_call("add_options", name)
end
end
@@ -227,15 +227,15 @@ function project._api_add_cxxfunc(interp, module, alias, links, includes, cxxfun
end
-- make option
- self:api_call("add_option", name)
- self:api_call("set_option_category", "cxxfuncs")
- self:api_call("add_option_cxxfuncs", cxxfunc)
- if links then self:api_call("add_option_links", links) end
- if includes then self:api_call("add_option_cxxincludes", includes) end
- self:api_call("add_option_defines_h_if_ok", define)
+ interp:api_call("add_option", name)
+ interp:api_call("set_option_category", "cxxfuncs")
+ interp:api_call("add_option_cxxfuncs", cxxfunc)
+ if links then interp:api_call("add_option_links", links) end
+ if includes then interp:api_call("add_option_cxxincludes", includes) end
+ interp:api_call("add_option_defines_h_if_ok", define)
-- add this option
- self:api_call("add_options", name)
+ interp:api_call("add_options", name)
end
-- add c++ functions
@@ -267,15 +267,15 @@ function project._api_add_cxxfuncs(interp, module, links, includes, ...)
end
-- make option
- self:api_call("add_option", name)
- self:api_call("set_option_category", "cxxfuncs")
- self:api_call("add_option_cxxfuncs", cxxfunc)
- if links then self:api_call("add_option_links", links) end
- if includes then self:api_call("add_option_cxxincludes", includes) end
- self:api_call("add_option_defines_h_if_ok", define)
+ interp:api_call("add_option", name)
+ interp:api_call("set_option_category", "cxxfuncs")
+ interp:api_call("add_option_cxxfuncs", cxxfunc)
+ if links then interp:api_call("add_option_links", links) end
+ if includes then interp:api_call("add_option_cxxincludes", includes) end
+ interp:api_call("add_option_defines_h_if_ok", define)
-- add this option
- self:api_call("add_options", name)
+ interp:api_call("add_options", name)
end
end
@@ -460,7 +460,7 @@ function project._makeconf_for_target(target_name, target)
-- check
assert(target_name and target)
-
+
-- get the target configure file
local config_h = target.config_h
if not config_h then
@@ -859,7 +859,7 @@ function project.probe()
assert(interp)
-- load the options from the the project file
- local options, errors = interp:load(xmake._PROJECT_FILE, "option", true)
+ local options, errors = interp:load(xmake._PROJECT_FILE, "option", true, true)
if not options then
return errors
end
@@ -876,7 +876,7 @@ function project.load()
assert(interp)
-- load targets
- local targets, errors = interp:load(xmake._PROJECT_FILE, "target", true)
+ local targets, errors = interp:load(xmake._PROJECT_FILE, "target", true, true)
if not targets then
return errors
end
@@ -994,7 +994,7 @@ function project.menu()
local errors = nil
local projectfile = xmake._PROJECT_FILE
if projectfile and os.isfile(projectfile) then
- options, errors = interp:load(projectfile, "option", true)
+ options, errors = interp:load(projectfile, "option", true, false)
end
-- failed?