summaryrefslogtreecommitdiff
path: root/xmake/scripts/base/project.lua
diff options
context:
space:
mode:
Diffstat (limited to 'xmake/scripts/base/project.lua')
-rw-r--r--xmake/scripts/base/project.lua44
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