summaryrefslogtreecommitdiffstats
path: root/Source/cmQtAutoGenerator.cxx
diff options
context:
space:
mode:
authorSebastian Holtermann <sebholt@xwmw.org>2018-06-14 14:14:57 (GMT)
committerSebastian Holtermann <sebholt@xwmw.org>2018-06-21 17:16:40 (GMT)
commite28dc3b1d8863bc39e9f7545beb50a2f35fd2647 (patch)
tree3d89191a9d368bd6ed3e509d3e13cc27d3d13112 /Source/cmQtAutoGenerator.cxx
parent39f40bde4b783e738addb4327c53c8b47a0c0178 (diff)
downloadCMake-e28dc3b1d8863bc39e9f7545beb50a2f35fd2647.zip
CMake-e28dc3b1d8863bc39e9f7545beb50a2f35fd2647.tar.gz
CMake-e28dc3b1d8863bc39e9f7545beb50a2f35fd2647.tar.bz2
Autogen: Add CMAKE_AUTOGEN_VERBOSE variable support
Setting CMAKE_AUTOGEN_VERBOSE enables verbose output during AUTOMOC, AUTOUIC and AUTORCC generation.
Diffstat (limited to 'Source/cmQtAutoGenerator.cxx')
-rw-r--r--Source/cmQtAutoGenerator.cxx22
1 files changed, 19 insertions, 3 deletions
diff --git a/Source/cmQtAutoGenerator.cxx b/Source/cmQtAutoGenerator.cxx
index 7aa792f..64ce0e3 100644
--- a/Source/cmQtAutoGenerator.cxx
+++ b/Source/cmQtAutoGenerator.cxx
@@ -17,9 +17,14 @@
// -- Class methods
-void cmQtAutoGenerator::Logger::SetVerbose(bool value)
+void cmQtAutoGenerator::Logger::RaiseVerbosity(std::string const& value)
{
- Verbose_ = value;
+ unsigned long verbosity = 0;
+ if (cmSystemTools::StringToULong(value.c_str(), &verbosity)) {
+ if (this->Verbosity_ < verbosity) {
+ this->Verbosity_ = static_cast<unsigned int>(verbosity);
+ }
+ }
}
void cmQtAutoGenerator::Logger::SetColorOutput(bool value)
@@ -632,7 +637,18 @@ cmQtAutoGenerator::cmQtAutoGenerator()
: FileSys_(&Logger_)
{
// Initialize logger
- Logger_.SetVerbose(cmSystemTools::HasEnv("VERBOSE"));
+ {
+ std::string verbose;
+ if (cmSystemTools::GetEnv("VERBOSE", verbose) && !verbose.empty()) {
+ unsigned long iVerbose = 0;
+ if (cmSystemTools::StringToULong(verbose.c_str(), &iVerbose)) {
+ Logger_.SetVerbosity(static_cast<unsigned int>(iVerbose));
+ } else {
+ // Non numeric verbosity
+ Logger_.SetVerbose(cmSystemTools::IsOn(verbose.c_str()));
+ }
+ }
+ }
{
std::string colorEnv;
cmSystemTools::GetEnv("COLOR", colorEnv);