diff options
author | Florian Maushart <FloriansGit@online.ms> | 2019-01-24 18:31:18 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2019-01-28 14:44:50 (GMT) |
commit | 439fe2e253410305ff7018416ff5ff26aa851d53 (patch) | |
tree | 5fd4875e35c4c737b40e08a658db0e935df09fc9 /Source/cmake.cxx | |
parent | 638667efa2b0e5fff5c63bf936748a60b602ae90 (diff) | |
download | CMake-439fe2e253410305ff7018416ff5ff26aa851d53.zip CMake-439fe2e253410305ff7018416ff5ff26aa851d53.tar.gz CMake-439fe2e253410305ff7018416ff5ff26aa851d53.tar.bz2 |
cmake: Add options for verbose output to --build mode
While we already support `VERBOSE` environment variable and
`CMAKE_VERBOSE_MAKEFILE` cached variable, add `-v` and `--verbose`
command line options to be able to activate verbose output directly from
CMake's build tool mode command line.
Also make `msbuild` honor the verbosity setting. `xcodebuild` still
doesn't honor the verbosity setting as it will need a policy added
and reworking of cmGlobalGenerator and cmsys to support
multiple command invocation.
Diffstat (limited to 'Source/cmake.cxx')
-rw-r--r-- | Source/cmake.cxx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx index 914c3b0..411ba3a 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -2539,7 +2539,8 @@ cmMessenger* cmake::GetMessenger() const int cmake::Build(int jobs, const std::string& dir, const std::string& target, const std::string& config, - const std::vector<std::string>& nativeOptions, bool clean) + const std::vector<std::string>& nativeOptions, bool clean, + bool verbose) { this->SetHomeDirectory(""); @@ -2592,11 +2593,11 @@ int cmake::Build(int jobs, const std::string& dir, const std::string& target, return 1; } projName = cachedProjectName; - bool verbose = false; + const char* cachedVerbose = this->State->GetCacheEntryValue("CMAKE_VERBOSE_MAKEFILE"); - if (cachedVerbose) { - verbose = cmSystemTools::IsOn(cachedVerbose); + if (cmSystemTools::IsOn(cachedVerbose)) { + verbose = true; } #ifdef CMAKE_HAVE_VS_GENERATORS |