diff options
| author | ruki <[email protected]> | 2015-05-26 10:19:43 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2015-05-26 10:19:43 +0800 |
| commit | f4562609df7ac3f395e5178e76fcefa2c1ffa980 (patch) | |
| tree | 526caad47b590de1be57996ee19b28d4e34d082a /xmake/scripts/base/config.lua | |
| parent | 49ae120e090b2d4dd15e486ade2dfc2ea1ded440 (diff) | |
probe configure for macosx
Diffstat (limited to 'xmake/scripts/base/config.lua')
| -rw-r--r-- | xmake/scripts/base/config.lua | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/xmake/scripts/base/config.lua b/xmake/scripts/base/config.lua index 2e64e2430..e6b4dbfdd 100644 --- a/xmake/scripts/base/config.lua +++ b/xmake/scripts/base/config.lua @@ -207,6 +207,23 @@ function config.get(name) return config._CURRENT[name] end +-- set the given configure to the current +function config.set(name, value) + + -- check + assert(config._CURRENT and name and value) + + -- get the current target + local target = config._target() + assert(target) + + -- set it to the current target configure for saving to file + target[name] = value + + -- set it to the current configure + config._CURRENT[name] = value +end + -- save xmake.xconf function config.savexconf() @@ -340,9 +357,7 @@ function config.dump() assert(config._CURRENT) -- dump - if xmake._OPTIONS.verbose then - utils.dump(config._CURRENT) - end + utils.dump(config._CURRENT) end |
