diff options
| author | ruki <[email protected]> | 2018-10-10 00:42:31 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2018-10-09 22:15:10 +0800 |
| commit | 4c983396a3e6ed609181657e2f60f6c6ff09215b (patch) | |
| tree | f63eef300c58f968bcc682c64dc5e0c36fcb23c4 | |
| parent | d4a0b79c1b033acf0fb9d5f305c135b3f6c6ae2a (diff) | |
fix package option
| -rw-r--r-- | xmake/core/project/project.lua | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/xmake/core/project/project.lua b/xmake/core/project/project.lua index b2bc6deb0..e63c25149 100644 --- a/xmake/core/project/project.lua +++ b/xmake/core/project/project.lua @@ -440,15 +440,7 @@ function project._load_options(disable_filter) for _, require_str in ipairs(table.wrap(project.get("requires"))) do -- get the package name - local splitinfo = require_str:split('%s+') - local packageinfo = splitinfo[1] - local packagename = nil - local pos = packageinfo:find_last('@', true) - if pos then - packagename = packageinfo:sub(pos + 1) - else - packagename = packageinfo - end + local packagename = require_str:split('%s+')[1] -- check assert(not results[packagename], "requires(\"" .. packagename .. "\") and option(\"" .. packagename .. "\") conflicts!") @@ -462,6 +454,7 @@ function project._load_options(disable_filter) if require_extra then -- override values from the extra option + local interp = project.interpreter() for name, value in pairs(table.wrap(require_extra.option)) do if type(value) == "function" then local maps = {on_check = "check", before_check = "check_before", after_check = "check_after"} |
