diff options
| author | ruki <[email protected]> | 2015-06-10 15:13:17 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2015-06-10 15:13:17 +0800 |
| commit | 33ad09c9a126cb83ba45fb6f1f2c2898cfbb2dbb (patch) | |
| tree | d5d9b3c7c39a10426fa5900f5021fabb9e49dfdd /xmake/scripts/base/project.lua | |
| parent | 112bd89dfd816cac735e447e41de0ff9c5687390 (diff) | |
save object to configure
Diffstat (limited to 'xmake/scripts/base/project.lua')
| -rw-r--r-- | xmake/scripts/base/project.lua | 44 |
1 files changed, 34 insertions, 10 deletions
diff --git a/xmake/scripts/base/project.lua b/xmake/scripts/base/project.lua index 4fd325f02..a42028e29 100644 --- a/xmake/scripts/base/project.lua +++ b/xmake/scripts/base/project.lua @@ -321,8 +321,8 @@ function project._makeconf_for_target_and_deps(target_name) return true end --- make the project configure -function project._make(configs) +-- make targets from the project file +function project._make_targets(configs) -- check assert(configs) @@ -373,6 +373,18 @@ function project._make(configs) end end +-- make options from the project file +function project._make_options(configs) + + -- check + assert(configs) + + -- init + project._OPTIONS = project._OPTIONS or {} + local options = project._OPTIONS + +end + -- only load options from the the project file function project._load_options(file) @@ -534,18 +546,30 @@ function project.targets() return project._TARGETS end --- load the project file -function project.load(file) +-- probe the project +function project.probe() + + -- load the options from the the project file + local configs, errors = project._load_options(xmake._PROJECT_FILE) + if not configs then + return errors + end + + -- make the options from the the project file + project._make_options(configs) +end + +-- load the project +function project.load() - -- load the targets from the the project configure - local configs, errors = project._load_targets(file) + -- load the targets from the the project file + local configs, errors = project._load_targets(xmake._PROJECT_FILE) if not configs then - utils.error(errors) - return + return errors end - -- load and make targets from the the project configure - project._make(configs) + -- make the targets from the the project file + project._make_targets(configs) end -- dump the current configure |
