diff options
Diffstat (limited to 'xmake/core/project/option.lua')
| -rw-r--r-- | xmake/core/project/option.lua | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/xmake/core/project/option.lua b/xmake/core/project/option.lua index 0364b3b47..40fd43f1a 100644 --- a/xmake/core/project/option.lua +++ b/xmake/core/project/option.lua @@ -414,13 +414,13 @@ function _instance:add(name, ...) self:_invalidate() end --- remove the value to the option info +-- remove the value to the option info (deprecated) function _instance:del(name, ...) self._INFO:apival_del(name, ...) self:_invalidate() end --- remove the value to the option info (deprecated) +-- remove the value to the option info function _instance:remove(name, ...) self._INFO:apival_remove(name, ...) self:_invalidate() @@ -454,6 +454,11 @@ function _instance:name() return self._NAME end +-- get the option description +function _instance:description() + return self:get("description") or ("The " .. self:name() .. " option") +end + -- get the cache key function _instance:cachekey() return string.format("%s_%d", tostring(self), self._CACHEID) |
