diff options
| author | ruki <[email protected]> | 2018-10-12 22:33:34 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2018-10-12 09:21:29 +0800 |
| commit | 0cc1abf8bb6bfb42b206b5e0f3330dc38cb36b1d (patch) | |
| tree | ddc5d9d04c9b82f40bde0ac317ee2b90720fdf19 /xmake/core/project/project.lua | |
| parent | 93e2e7a6d2aec177bb9be54df708d3c5b26cf0a3 (diff) | |
add set_config
Diffstat (limited to 'xmake/core/project/project.lua')
| -rw-r--r-- | xmake/core/project/project.lua | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/xmake/core/project/project.lua b/xmake/core/project/project.lua index e63c25149..1386ebc26 100644 --- a/xmake/core/project/project.lua +++ b/xmake/core/project/project.lua @@ -108,6 +108,13 @@ function project._api_has_config(interp, ...) return config.has(...) end +-- set config from the given name +function project._api_set_config(interp, name, value) + if not config.readonly(name) then + config.set(name, value) + end +end + -- get config from the given name function project._api_get_config(interp, name) return config.get(name) @@ -205,7 +212,11 @@ function project.interpreter() , {"is_plat", project._api_is_plat } , {"is_arch", project._api_is_arch } , {"is_config", project._api_is_config } + -- set_xxx + , {"set_config", project._api_set_config } + -- get_xxx , {"get_config", project._api_get_config } + -- has_xxx , {"has_config", project._api_has_config } -- add_xxx , {"add_moduledirs", project._api_add_moduledirs } |
