diff options
author | Brad King <brad.king@kitware.com> | 2015-03-10 12:42:18 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2015-03-10 12:42:18 (GMT) |
commit | 94887cb6f1200c505d86e3e52f7abf88cb5e2a72 (patch) | |
tree | 126d95072641952b50da6437e0e1d4e43eb42635 /Source/cmGlobalGenerator.cxx | |
parent | a6d488f2ceb62b968c6f0a8971a3556195af80ca (diff) | |
download | CMake-94887cb6f1200c505d86e3e52f7abf88cb5e2a72.zip CMake-94887cb6f1200c505d86e3e52f7abf88cb5e2a72.tar.gz CMake-94887cb6f1200c505d86e3e52f7abf88cb5e2a72.tar.bz2 |
cmake: Teach --build to get VCExpress output (#15437)
VCExpress does not produce output if its pipes are connected to
an interactive terminal. Add a special case to 'cmake --build'
to capture the output through a pipe and re-print it instead of
sharing output pipes with VCExpress.
Diffstat (limited to 'Source/cmGlobalGenerator.cxx')
-rw-r--r-- | Source/cmGlobalGenerator.cxx | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 36395aa..e95cf50 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -1717,6 +1717,19 @@ int cmGlobalGenerator::Build( std::string outputBuffer; std::string* outputPtr = &outputBuffer; + std::vector<std::string> makeCommand; + this->GenerateBuildCommand(makeCommand, makeCommandCSTR, projectName, + bindir, target, config, fast, verbose, + nativeOptions); + + // Workaround to convince VCExpress.exe to produce output. + if (outputflag == cmSystemTools::OUTPUT_PASSTHROUGH && + !makeCommand.empty() && cmSystemTools::LowerCase( + cmSystemTools::GetFilenameName(makeCommand[0])) == "vcexpress.exe") + { + outputflag = cmSystemTools::OUTPUT_NORMAL; + } + // should we do a clean first? if (clean) { @@ -1743,10 +1756,6 @@ int cmGlobalGenerator::Build( } // now build - std::vector<std::string> makeCommand; - this->GenerateBuildCommand(makeCommand, makeCommandCSTR, projectName, - bindir, target, config, fast, verbose, - nativeOptions); std::string makeCommandStr = cmSystemTools::PrintSingleCommand(makeCommand); output += "\nRun Build Command:"; output += makeCommandStr; |