diff options
Diffstat (limited to 'xmake/core/project/option.lua')
| -rw-r--r-- | xmake/core/project/option.lua | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/xmake/core/project/option.lua b/xmake/core/project/option.lua index abe1ace93..531f295db 100644 --- a/xmake/core/project/option.lua +++ b/xmake/core/project/option.lua @@ -475,10 +475,8 @@ end -- get xxx_script function _instance:script(name) - -- get script - local script = self:get(name) - -- imports some modules first + local script = self:get(name) if script then local scope = getfenv(script) if scope then @@ -487,11 +485,25 @@ function _instance:script(name) end end end - - -- ok return script end +-- show menu? +function _instance:showmenu() + local showmenu = self:get("showmenu") + if showmenu == nil then + -- auto check mode? we hidden menu by default + if self:get("ctypes") or self:get("cxxtypes") or + self:get("cfuncs") or self:get("cxxfuncs") or + self:get("cincludes") or self:get("cxxincludes") or + self:get("links") or self:get("syslinks") or + self:get("csnippets") or self:get("cxxsnippets") then + showmenu = false + end + end + return showmenu +end + -- get cache function option._cache() return localcache.cache("option") |
