diff options
author | Ben Boeckel <ben.boeckel@kitware.com> | 2023-02-08 19:12:40 (GMT) |
---|---|---|
committer | Ben Boeckel <ben.boeckel@kitware.com> | 2023-05-16 16:48:20 (GMT) |
commit | e06066653124f4fd8d1f9ca1c3e1cd8a4ceac7f9 (patch) | |
tree | 903d2dd031e3c16c1b755777f7274ba87008ec19 /Source | |
parent | b017c9f12758ea169aa6009a4146e1562946e3a0 (diff) | |
download | CMake-e06066653124f4fd8d1f9ca1c3e1cd8a4ceac7f9.zip CMake-e06066653124f4fd8d1f9ca1c3e1cd8a4ceac7f9.tar.gz CMake-e06066653124f4fd8d1f9ca1c3e1cd8a4ceac7f9.tar.bz2 |
cmake: write the build command itself with `--verbose`
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmake.cxx | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx index 0fd7461..868728f 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -3699,10 +3699,19 @@ int cmake::Build(int jobs, std::string dir, std::vector<std::string> targets, } this->GlobalGenerator->PrintBuildCommandAdvice(std::cerr, jobs); - return this->GlobalGenerator->Build( + int buildresult = this->GlobalGenerator->Build( jobs, "", dir, projName, targets, output, "", config, buildOptions, verbose, cmDuration::zero(), cmSystemTools::OUTPUT_PASSTHROUGH, nativeOptions); + + if (verbose) { + // `cmGlobalGenerator::Build` logs metadata about what directory and + // commands are being executed to the `output` parameter. If CMake is + // verbose, print this out. + std::cout << output; + } + + return buildresult; } bool cmake::Open(const std::string& dir, bool dryRun) |