diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 36395aa67..e95cf5066 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 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 makeCommand; - this->GenerateBuildCommand(makeCommand, makeCommandCSTR, projectName, - bindir, target, config, fast, verbose, - nativeOptions); std::string makeCommandStr = cmSystemTools::PrintSingleCommand(makeCommand); output += "\nRun Build Command:"; output += makeCommandStr;