diff options
| author | ruki <[email protected]> | 2017-07-19 21:12:51 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2017-07-19 21:12:51 +0800 |
| commit | 1ea7269e5078041df9c170b020953273ea176675 (patch) | |
| tree | cade92c9dd13d9bc69f62007d5f41f717c4124ff /xmake/core/project/option.lua | |
| parent | 2b52ec7d069e2a5b297b52f6696f70f3d53ff385 (diff) | |
fix config and add readonly mode
Diffstat (limited to 'xmake/core/project/option.lua')
| -rw-r--r-- | xmake/core/project/option.lua | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/xmake/core/project/option.lua b/xmake/core/project/option.lua index 0400fd1d3..d8e347ca9 100644 --- a/xmake/core/project/option.lua +++ b/xmake/core/project/option.lua @@ -245,10 +245,12 @@ end function option:enable(enabled) -- enable or disable this option? - config.set(self:name(), enabled) + if not config.readonly(self:name()) then + config.set(self:name(), enabled) + end -- save or clear this option in cache - if enabled then + if self:enabled() then self:_save() else self:_clear() |
