summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTitanSnow <[email protected]>2017-05-07 14:19:34 +0800
committerTitanSnow <[email protected]>2017-05-07 14:19:34 +0800
commit16e19bc640b3750ed47e190a11c336620cc09b8b (patch)
tree9a149e68f260dfbc83e1f37900e24829a808b62a
parente0f42744605dda5dea3fc973b5885c80baa57940 (diff)
add features print
-rw-r--r--xmake/core/main.lua16
1 files changed, 16 insertions, 0 deletions
diff --git a/xmake/core/main.lua b/xmake/core/main.lua
index 97c77ae43..de0ab15af 100644
--- a/xmake/core/main.lua
+++ b/xmake/core/main.lua
@@ -44,6 +44,17 @@ local menu =
-- copyright
, copyright = "Copyright (C) 2015-2016 Ruki Wang, ${underline}tboox.org${clear}, ${underline}xmake.io${clear}\nCopyright (C) 2005-2015 Mike Pall, ${underline}luajit.org${clear}"
+ -- features
+, features = (function()
+ local str = ""
+ for _, val in ipairs(os.features()) do
+ str = str .. val .. ", "
+ end
+ if #str ~= 0 then
+ return "Enable: " .. str:sub(1, #str - 2)
+ end
+ end)()
+
-- the tasks: xmake [task]
, task.menu
@@ -74,6 +85,11 @@ function main._help()
utils.cprint(menu.copyright)
end
+ -- print features
+ if menu.features then
+ utils.print(menu.features)
+ end
+
-- ok
return true
end