mirror of
https://github.com/Kitware/CMake.git
synced 2025-12-31 19:00:54 -06:00
cmake: write the build command itself with --verbose
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
cmake-verbose-print-build-tool-command
|
||||
--------------------------------------
|
||||
|
||||
* ``cmake --build $dir --verbose`` will now print the working directory and
|
||||
command line used to perform the build.
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user