summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2016-02-28 14:20:16 +0800
committerruki <[email protected]>2016-02-28 14:20:16 +0800
commit95860a08bd483a3f900ea15ba30c69faa60e01e8 (patch)
tree7358ffdef1f24263cb4d9b3189c49e2ba390c758
parent5c154ce0b281f073fb6c8e475e932837da0d5117 (diff)
hide verbose for options
-rw-r--r--xmake/core/base/compiler.lua6
-rw-r--r--xmake/core/base/linker.lua2
-rw-r--r--xmake/core/base/platform.lua2
-rw-r--r--xmake/core/base/project.lua2
-rw-r--r--xmake/core/base/utils.lua2
-rw-r--r--xmake/core/platforms/windows/tools/nmake.lua2
-rw-r--r--xmake/core/tools/make.lua8
-rw-r--r--xmake/core/tools/verbose.lua2
8 files changed, 13 insertions, 13 deletions
diff --git a/xmake/core/base/compiler.lua b/xmake/core/base/compiler.lua
index afcab4ab7..b5773827d 100644
--- a/xmake/core/base/compiler.lua
+++ b/xmake/core/base/compiler.lua
@@ -487,7 +487,7 @@ function compiler.check_include(opt, include, srcpath, objpath)
if not module then return end
-- execute the compile command
- return module:main(compiler._make_for_option(module, opt, srcpath, objpath, utils.ifelse(option.options().verbose, nil, xmake._NULDEV)))
+ return module:main(compiler._make_for_option(module, opt, srcpath, objpath, utils.ifelse(option.get("verbose"), nil, xmake._NULDEV)))
end
-- check function for the project option
@@ -531,7 +531,7 @@ function compiler.check_function(opt, interface, srcpath, objpath)
srcfile:close()
-- execute the compile command
- return module:main(compiler._make_for_option(module, opt, srcpath, objpath, utils.ifelse(option.options().verbose, nil, xmake._NULDEV)))
+ return module:main(compiler._make_for_option(module, opt, srcpath, objpath, utils.ifelse(option.get("verbose"), nil, xmake._NULDEV)))
end
-- check typedef for the project option
@@ -575,7 +575,7 @@ function compiler.check_typedef(opt, typedef, srcpath, objpath)
srcfile:close()
-- execute the compile command
- return module:main(compiler._make_for_option(module, opt, srcpath, objpath, utils.ifelse(option.options().verbose, nil, xmake._NULDEV)))
+ return module:main(compiler._make_for_option(module, opt, srcpath, objpath, utils.ifelse(option.get("verbose"), nil, xmake._NULDEV)))
end
-- return module: compiler
diff --git a/xmake/core/base/linker.lua b/xmake/core/base/linker.lua
index 905d56c5e..4169c5cfe 100644
--- a/xmake/core/base/linker.lua
+++ b/xmake/core/base/linker.lua
@@ -380,7 +380,7 @@ function linker.check_links(opt, links, sourcefile, objectfile, targetfile)
flags = utils.unique(flags)
-- execute the link command
- return module:main(module:command_link(objectfile, targetfile, table.concat(flags, " "):trim(), utils.ifelse(option.options().verbose, nil, xmake._NULDEV)))
+ return module:main(module:command_link(objectfile, targetfile, table.concat(flags, " "):trim(), utils.ifelse(option.get("verbose"), nil, xmake._NULDEV)))
end
-- return module: linker
diff --git a/xmake/core/base/platform.lua b/xmake/core/base/platform.lua
index eaa286d3a..6a4481a09 100644
--- a/xmake/core/base/platform.lua
+++ b/xmake/core/base/platform.lua
@@ -246,7 +246,7 @@ function platform.dump()
assert(platform._CONFIGS)
-- dump
- if option.options().verbose then
+ if option.get("verbose") then
utils.dump(platform._configs(config.get("plat")))
end
diff --git a/xmake/core/base/project.lua b/xmake/core/base/project.lua
index 812ce1558..6e39d96b7 100644
--- a/xmake/core/base/project.lua
+++ b/xmake/core/base/project.lua
@@ -947,7 +947,7 @@ end
function project.dump()
-- dump
- if option.options().verbose then
+ if option.get("verbose") then
utils.dump(project.targets())
end
diff --git a/xmake/core/base/utils.lua b/xmake/core/base/utils.lua
index edc302352..8e6aacd5f 100644
--- a/xmake/core/base/utils.lua
+++ b/xmake/core/base/utils.lua
@@ -39,7 +39,7 @@ end
-- the verbose function
function utils.verbose(msg, ...)
- if option.options().verbose then
+ if option.get("verbose") then
-- check
assert(msg)
diff --git a/xmake/core/platforms/windows/tools/nmake.lua b/xmake/core/platforms/windows/tools/nmake.lua
index dc659cafd..68f04a31a 100644
--- a/xmake/core/platforms/windows/tools/nmake.lua
+++ b/xmake/core/platforms/windows/tools/nmake.lua
@@ -39,7 +39,7 @@ function nmake.init(self, name)
self.name = name or "nmake.exe"
-- is verbose?
- self._VERBOSE = utils.ifelse(option.options().verbose, "-v", "")
+ self._VERBOSE = utils.ifelse(option.get("verbose"), "-v", "")
end
diff --git a/xmake/core/tools/make.lua b/xmake/core/tools/make.lua
index 74bd4a5f4..c6664fd69 100644
--- a/xmake/core/tools/make.lua
+++ b/xmake/core/tools/make.lua
@@ -35,7 +35,7 @@ function make.init(self, name)
self.name = name or "make"
-- is verbose?
- self._VERBOSE = utils.ifelse(option.options().verbose, "-v", "")
+ self._VERBOSE = utils.ifelse(option.get("verbose"), "-v", "")
end
@@ -44,9 +44,9 @@ function make.main(self, mkfile, target)
-- enable jobs?
local jobs = ""
- if option.options().jobs ~= nil then
- if tonumber(option.options().jobs) ~= 0 then
- jobs = "-j" .. option.options().jobs
+ if option.get("jobs") ~= nil then
+ if tonumber(option.get("jobs")) ~= 0 then
+ jobs = "-j" .. option.get("jobs")
else
jobs = "-j"
end
diff --git a/xmake/core/tools/verbose.lua b/xmake/core/tools/verbose.lua
index 04e843e76..2964ceb67 100644
--- a/xmake/core/tools/verbose.lua
+++ b/xmake/core/tools/verbose.lua
@@ -33,7 +33,7 @@ local option = require("base/option")
function verbose.main(self, ...)
-- verbose all
- if option.options().verbose then
+ if option.get("verbose") then
for _, v in ipairs(...) do
io.write(string.format("%s ", v:decode()))
end