diff options
Diffstat (limited to 'Source')
-rw-r--r-- | Source/CMakeVersion.cmake | 2 | ||||
-rw-r--r-- | Source/CTest/cmCTestCoverageHandler.cxx | 33 | ||||
-rw-r--r-- | Source/CTest/cmCTestCoverageHandler.h | 2 | ||||
-rw-r--r-- | Source/cmGeneratorExpressionNode.cxx | 7 | ||||
-rw-r--r-- | Source/cmGeneratorTarget.cxx | 1 | ||||
-rw-r--r-- | Source/cmGetFilenameComponentCommand.cxx | 4 | ||||
-rw-r--r-- | Source/cmGlobalGenerator.cxx | 13 | ||||
-rw-r--r-- | Source/cmGlobalGenerator.h | 6 | ||||
-rw-r--r-- | Source/cmGlobalJOMMakefileGenerator.cxx | 28 | ||||
-rw-r--r-- | Source/cmGlobalJOMMakefileGenerator.h | 3 | ||||
-rw-r--r-- | Source/cmGlobalNMakeMakefileGenerator.cxx | 28 | ||||
-rw-r--r-- | Source/cmGlobalNMakeMakefileGenerator.h | 3 | ||||
-rw-r--r-- | Source/cmGlobalNinjaGenerator.cxx | 19 | ||||
-rw-r--r-- | Source/cmGlobalNinjaGenerator.h | 8 | ||||
-rw-r--r-- | Source/cmGlobalUnixMakefileGenerator3.cxx | 4 | ||||
-rw-r--r-- | Source/cmGlobalVisualStudioGenerator.cxx | 10 | ||||
-rw-r--r-- | Source/cmLocalNinjaGenerator.cxx | 14 | ||||
-rw-r--r-- | Source/cmMakefile.h | 4 | ||||
-rw-r--r-- | Source/cmcmd.cxx | 19 |
19 files changed, 136 insertions, 72 deletions
diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake index c9fec35..40653ad 100644 --- a/Source/CMakeVersion.cmake +++ b/Source/CMakeVersion.cmake @@ -1,5 +1,5 @@ # CMake version number components. set(CMake_VERSION_MAJOR 3) set(CMake_VERSION_MINOR 3) -set(CMake_VERSION_PATCH 20150806) +set(CMake_VERSION_PATCH 20150811) #set(CMake_VERSION_RC 1) diff --git a/Source/CTest/cmCTestCoverageHandler.cxx b/Source/CTest/cmCTestCoverageHandler.cxx index 6369e17..65599e0 100644 --- a/Source/CTest/cmCTestCoverageHandler.cxx +++ b/Source/CTest/cmCTestCoverageHandler.cxx @@ -1474,7 +1474,12 @@ int cmCTestCoverageHandler::HandleLCovCoverage( << std::endl, this->Quiet); std::vector<std::string> files; - this->FindLCovFiles(files); + if (!this->FindLCovFiles(files)) + { + cmCTestLog(this->CTest, ERROR_MESSAGE, + "Error while finding LCov files.\n"); + return 0; + } std::vector<std::string>::iterator it; if (files.empty()) @@ -1745,18 +1750,28 @@ void cmCTestCoverageHandler::FindGCovFiles(std::vector<std::string>& files) } //---------------------------------------------------------------------------- -void cmCTestCoverageHandler::FindLCovFiles(std::vector<std::string>& files) +bool cmCTestCoverageHandler::FindLCovFiles(std::vector<std::string>& files) { cmsys::Glob gl; gl.RecurseOff(); // No need of recurse if -prof_dir${BUILD_DIR} flag is // used while compiling. gl.RecurseThroughSymlinksOff(); std::string prevBinaryDir; - cmSystemTools::ChangeDirectory( - this->CTest->GetCTestConfiguration("BuildDirectory")); + std::string buildDir = this->CTest->GetCTestConfiguration("BuildDirectory"); + if (cmSystemTools::ChangeDirectory(buildDir)) + { + cmCTestLog(this->CTest, ERROR_MESSAGE, + "Error changing directory to " << buildDir << std::endl); + return false; + } // Run profmerge to merge all *.dyn files into dpi files - cmSystemTools::RunSingleCommand("profmerge"); + if (!cmSystemTools::RunSingleCommand("profmerge")) + { + cmCTestLog(this->CTest, ERROR_MESSAGE, + "Error while running profmerge.\n"); + return false; + } prevBinaryDir = cmSystemTools::GetCurrentWorkingDirectory().c_str(); @@ -1766,10 +1781,16 @@ void cmCTestCoverageHandler::FindLCovFiles(std::vector<std::string>& files) daGlob += "/*.dpi"; cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT, " looking for dpi files in: " << daGlob << std::endl, this->Quiet); - gl.FindFiles(daGlob); + if (!gl.FindFiles(daGlob)) + { + cmCTestLog(this->CTest, ERROR_MESSAGE, + "Error while finding files matching " << daGlob << std::endl); + return false; + } files.insert(files.end(), gl.GetFiles().begin(), gl.GetFiles().end()); cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Now searching in: " << daGlob << std::endl, this->Quiet); + return true; } //---------------------------------------------------------------------- diff --git a/Source/CTest/cmCTestCoverageHandler.h b/Source/CTest/cmCTestCoverageHandler.h index 2ca123a..7102d1e 100644 --- a/Source/CTest/cmCTestCoverageHandler.h +++ b/Source/CTest/cmCTestCoverageHandler.h @@ -75,7 +75,7 @@ private: //! Handle coverage using Intel's LCov int HandleLCovCoverage(cmCTestCoverageHandlerContainer* cont); - void FindLCovFiles(std::vector<std::string>& files); + bool FindLCovFiles(std::vector<std::string>& files); //! Handle coverage using xdebug php coverage int HandlePHPCoverage(cmCTestCoverageHandlerContainer* cont); diff --git a/Source/cmGeneratorExpressionNode.cxx b/Source/cmGeneratorExpressionNode.cxx index 49f2515..03bc83a 100644 --- a/Source/cmGeneratorExpressionNode.cxx +++ b/Source/cmGeneratorExpressionNode.cxx @@ -1600,6 +1600,13 @@ struct TargetFilesystemArtifactResultCreator<ArtifactPdbTag> cmGeneratorExpressionContext *context, const GeneratorExpressionContent *content) { + if (target->IsImported()) + { + ::reportError(context, content->GetOriginalExpression(), + "TARGET_PDB_FILE not allowed for IMPORTED targets."); + return std::string(); + } + std::string language = target->GetLinkerLanguage(context->Config); std::string pdbSupportVar = "CMAKE_" + language + "_LINKER_SUPPORTS_PDB"; diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index aed2c07..76bc426 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -1248,6 +1248,7 @@ void cmGeneratorTarget::ComputeLinkClosure(const std::string& config, UNORDERED_SET<std::string> languages; cmTarget::LinkImplementation const* impl = this->Target->GetLinkImplementation(config); + assert(impl); for(std::vector<std::string>::const_iterator li = impl->Languages.begin(); li != impl->Languages.end(); ++li) { diff --git a/Source/cmGetFilenameComponentCommand.cxx b/Source/cmGetFilenameComponentCommand.cxx index 67f9f2d..13a9afb 100644 --- a/Source/cmGetFilenameComponentCommand.cxx +++ b/Source/cmGetFilenameComponentCommand.cxx @@ -24,7 +24,7 @@ bool cmGetFilenameComponentCommand // Check and see if the value has been stored in the cache // already, if so use that value - if(args.size() == 4 && args[3] == "CACHE") + if(args.size() >= 4 && args[args.size() - 1] == "CACHE") { const char* cacheValue = this->Makefile->GetDefinition(args[0]); if(cacheValue && !cmSystemTools::IsNOTFOUND(cacheValue)) @@ -111,7 +111,7 @@ bool cmGetFilenameComponentCommand return false; } - if(args.size() == 4 && args[3] == "CACHE") + if(args.size() >= 4 && args[args.size() - 1] == "CACHE") { if(!programArgs.empty() && !storeArgs.empty()) { diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 50e2cd9..35fe772 100644 --- a/Source/cmGlobalGenerator.cxx +++ b/Source/cmGlobalGenerator.cxx @@ -2055,10 +2055,10 @@ bool cmGlobalGenerator::IsExcluded(cmLocalGenerator* root, } bool cmGlobalGenerator::IsExcluded(cmLocalGenerator* root, - cmTarget const& target) const + cmGeneratorTarget* target) const { - if(target.GetType() == cmTarget::INTERFACE_LIBRARY - || target.GetPropertyAsBool("EXCLUDE_FROM_ALL")) + if(target->GetType() == cmTarget::INTERFACE_LIBRARY + || target->Target->GetPropertyAsBool("EXCLUDE_FROM_ALL")) { // This target is excluded from its directory. return true; @@ -2067,7 +2067,7 @@ bool cmGlobalGenerator::IsExcluded(cmLocalGenerator* root, { // This target is included in its directory. Check whether the // directory is excluded. - return this->IsExcluded(root, target.GetMakefile()->GetLocalGenerator()); + return this->IsExcluded(root, target->GetLocalGenerator()); } } @@ -2128,15 +2128,16 @@ void cmGlobalGenerator::FillLocalGeneratorToTargetMap() { cmTarget const& target = t->second; + cmGeneratorTarget* gt = this->GetGeneratorTarget(&target); + // Consider the directory containing the target and all its // parents until something excludes the target. - for(cmLocalGenerator* clg = lg; clg && !this->IsExcluded(clg, target); + for(cmLocalGenerator* clg = lg; clg && !this->IsExcluded(clg, gt); clg = clg->GetParent()) { // This local generator includes the target. std::set<cmGeneratorTarget const*>& targetSet = this->LocalGeneratorToTargetMap[clg]; - cmGeneratorTarget* gt = this->GetGeneratorTarget(&target); targetSet.insert(gt); // Add dependencies of the included target. An excluded diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h index 3402fbc..c35cba2 100644 --- a/Source/cmGlobalGenerator.h +++ b/Source/cmGlobalGenerator.h @@ -374,6 +374,8 @@ protected: void SetLanguageEnabledFlag(const std::string& l, cmMakefile* mf); void SetLanguageEnabledMaps(const std::string& l, cmMakefile* mf); void FillExtensionToLanguageMap(const std::string& l, cmMakefile* mf); + virtual void PrintCompilerAdvice(std::ostream& os, std::string const& lang, + const char* envVar) const; virtual bool ComputeTargetDepends(); @@ -391,7 +393,7 @@ protected: void FillProjectMap(); void CheckLocalGenerators(); bool IsExcluded(cmLocalGenerator* root, cmLocalGenerator* gen) const; - bool IsExcluded(cmLocalGenerator* root, cmTarget const& target) const; + bool IsExcluded(cmLocalGenerator* root, cmGeneratorTarget* target) const; void FillLocalGeneratorToTargetMap(); void CreateDefaultGlobalTargets(cmTargets* targets); cmTarget CreateGlobalTarget(const std::string& name, const char* message, @@ -462,8 +464,6 @@ private: virtual void ForceLinkerLanguages(); - virtual void PrintCompilerAdvice(std::ostream& os, std::string const& lang, - const char* envVar) const; void CheckCompilerIdCompatibility(cmMakefile* mf, std::string const& lang) const; diff --git a/Source/cmGlobalJOMMakefileGenerator.cxx b/Source/cmGlobalJOMMakefileGenerator.cxx index 50e7053..3f33f91 100644 --- a/Source/cmGlobalJOMMakefileGenerator.cxx +++ b/Source/cmGlobalJOMMakefileGenerator.cxx @@ -36,18 +36,6 @@ void cmGlobalJOMMakefileGenerator // pick a default mf->AddDefinition("CMAKE_GENERATOR_CC", "cl"); mf->AddDefinition("CMAKE_GENERATOR_CXX", "cl"); - if(!(cmSystemTools::GetEnv("INCLUDE") && - cmSystemTools::GetEnv("LIB")) - ) - { - std::string message = "To use the JOM generator, cmake must be run " - "from a shell that can use the compiler cl from the command line. " - "This environment does not contain INCLUDE, LIB, or LIBPATH, and " - "these must be set for the cl compiler to work. "; - mf->IssueMessage(cmake::WARNING, - message); - } - this->cmGlobalUnixMakefileGenerator3::EnableLanguage(l, mf, optional); } @@ -58,3 +46,19 @@ void cmGlobalJOMMakefileGenerator entry.Name = cmGlobalJOMMakefileGenerator::GetActualName(); entry.Brief = "Generates JOM makefiles."; } + +//---------------------------------------------------------------------------- +void cmGlobalJOMMakefileGenerator::PrintCompilerAdvice(std::ostream& os, + std::string const& lang, + const char* envVar) const +{ + if(lang == "CXX" || lang == "C") + { + os << + "To use the JOM generator with Visual C++, cmake must be run from a " + "shell that can use the compiler cl from the command line. This " + "environment is unable to invoke the cl compiler. To fix this problem, " + "run cmake from the Visual Studio Command Prompt (vcvarsall.bat).\n"; + } + this->cmGlobalUnixMakefileGenerator3::PrintCompilerAdvice(os, lang, envVar); +} diff --git a/Source/cmGlobalJOMMakefileGenerator.h b/Source/cmGlobalJOMMakefileGenerator.h index 2185b23..1869fed 100644 --- a/Source/cmGlobalJOMMakefileGenerator.h +++ b/Source/cmGlobalJOMMakefileGenerator.h @@ -42,6 +42,9 @@ public: */ virtual void EnableLanguage(std::vector<std::string>const& languages, cmMakefile *, bool optional); +private: + void PrintCompilerAdvice(std::ostream& os, std::string const& lang, + const char* envVar) const; }; #endif diff --git a/Source/cmGlobalNMakeMakefileGenerator.cxx b/Source/cmGlobalNMakeMakefileGenerator.cxx index 4219c34..7c570a6 100644 --- a/Source/cmGlobalNMakeMakefileGenerator.cxx +++ b/Source/cmGlobalNMakeMakefileGenerator.cxx @@ -36,18 +36,6 @@ void cmGlobalNMakeMakefileGenerator // pick a default mf->AddDefinition("CMAKE_GENERATOR_CC", "cl"); mf->AddDefinition("CMAKE_GENERATOR_CXX", "cl"); - if(!(cmSystemTools::GetEnv("INCLUDE") && - cmSystemTools::GetEnv("LIB")) - ) - { - std::string message = "To use the NMake generator, cmake must be run " - "from a shell that can use the compiler cl from the command line. " - "This environment does not contain INCLUDE, LIB, or LIBPATH, and " - "these must be set for the cl compiler to work. "; - mf->IssueMessage(cmake::WARNING, - message); - } - this->cmGlobalUnixMakefileGenerator3::EnableLanguage(l, mf, optional); } @@ -58,3 +46,19 @@ void cmGlobalNMakeMakefileGenerator entry.Name = cmGlobalNMakeMakefileGenerator::GetActualName(); entry.Brief = "Generates NMake makefiles."; } + +//---------------------------------------------------------------------------- +void cmGlobalNMakeMakefileGenerator::PrintCompilerAdvice(std::ostream& os, + std::string const& lang, + const char* envVar) const +{ + if(lang == "CXX" || lang == "C") + { + os << + "To use the NMake generator with Visual C++, cmake must be run from a " + "shell that can use the compiler cl from the command line. This " + "environment is unable to invoke the cl compiler. To fix this problem, " + "run cmake from the Visual Studio Command Prompt (vcvarsall.bat).\n"; + } + this->cmGlobalUnixMakefileGenerator3::PrintCompilerAdvice(os, lang, envVar); +} diff --git a/Source/cmGlobalNMakeMakefileGenerator.h b/Source/cmGlobalNMakeMakefileGenerator.h index dd72c49..3c8375a 100644 --- a/Source/cmGlobalNMakeMakefileGenerator.h +++ b/Source/cmGlobalNMakeMakefileGenerator.h @@ -40,6 +40,9 @@ public: */ virtual void EnableLanguage(std::vector<std::string>const& languages, cmMakefile *, bool optional); +private: + void PrintCompilerAdvice(std::ostream& os, std::string const& lang, + const char* envVar) const; }; #endif diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx index 088f0e1..b92ad32 100644 --- a/Source/cmGlobalNinjaGenerator.cxx +++ b/Source/cmGlobalNinjaGenerator.cxx @@ -547,6 +547,18 @@ void cmGlobalNinjaGenerator // Source/cmake.cxx void cmGlobalNinjaGenerator::Generate() { + // Check minimum Ninja version. + if (cmSystemTools::VersionCompare(cmSystemTools::OP_LESS, + CurrentNinjaVersion().c_str(), + RequiredNinjaVersion().c_str())) + { + std::ostringstream msg; + msg << "The detected version of Ninja (" << this->CurrentNinjaVersion(); + msg << ") is less than the version of Ninja required by CMake ("; + msg << this->RequiredNinjaVersion() << ")."; + this->GetCMakeInstance()->IssueMessage(cmake::FATAL_ERROR, msg.str()); + return; + } this->OpenBuildFileStream(); this->OpenRulesFileStream(); @@ -1256,7 +1268,7 @@ std::string cmGlobalNinjaGenerator::ninjaCmd() const return "ninja"; } -std::string cmGlobalNinjaGenerator::ninjaVersion() const +std::string cmGlobalNinjaGenerator::CurrentNinjaVersion() const { std::string version; std::string command = ninjaCmd() + " --version"; @@ -1264,13 +1276,14 @@ std::string cmGlobalNinjaGenerator::ninjaVersion() const &version, 0, 0, 0, cmSystemTools::OUTPUT_NONE); - return version; + return cmSystemTools::TrimWhitespace(version); } bool cmGlobalNinjaGenerator::SupportsConsolePool() const { return cmSystemTools::VersionCompare(cmSystemTools::OP_LESS, - ninjaVersion().c_str(), "1.5") == false; + CurrentNinjaVersion().c_str(), + RequiredNinjaVersionForConsolePool().c_str()) == false; } void cmGlobalNinjaGenerator::WriteTargetClean(std::ostream& os) diff --git a/Source/cmGlobalNinjaGenerator.h b/Source/cmGlobalNinjaGenerator.h index 2a749c1..f103801 100644 --- a/Source/cmGlobalNinjaGenerator.h +++ b/Source/cmGlobalNinjaGenerator.h @@ -289,7 +289,7 @@ public: const std::vector<cmLocalGenerator*>& GetLocalGenerators() const { return LocalGenerators; } - bool IsExcluded(cmLocalGenerator* root, cmTarget& target) { + bool IsExcluded(cmLocalGenerator* root, cmGeneratorTarget* target) { return cmGlobalGenerator::IsExcluded(root, target); } int GetRuleCmdLength(const std::string& name) { @@ -299,8 +299,10 @@ public: virtual void ComputeTargetObjectDirectory(cmGeneratorTarget* gt) const; - std::string ninjaVersion() const; - + std::string CurrentNinjaVersion() const; + // Ninja generator uses 'deps' and 'msvc_deps_prefix' introduced in 1.3 + static std::string RequiredNinjaVersion() { return "1.3"; } + static std::string RequiredNinjaVersionForConsolePool() { return "1.5"; } bool SupportsConsolePool() const; protected: diff --git a/Source/cmGlobalUnixMakefileGenerator3.cxx b/Source/cmGlobalUnixMakefileGenerator3.cxx index 69747a4..76d059ee 100644 --- a/Source/cmGlobalUnixMakefileGenerator3.cxx +++ b/Source/cmGlobalUnixMakefileGenerator3.cxx @@ -821,7 +821,7 @@ cmGlobalUnixMakefileGenerator3 localName, depends, commands, true); // add the all/all dependency - if(!this->IsExcluded(this->LocalGenerators[0], *gtarget->Target)) + if(!this->IsExcluded(this->LocalGenerators[0], gtarget)) { depends.clear(); depends.push_back(localName); @@ -889,7 +889,7 @@ cmGlobalUnixMakefileGenerator3 "Pre-install relink rule for target.", localName, depends, commands, true); - if(!this->IsExcluded(this->LocalGenerators[0], *gtarget->Target)) + if(!this->IsExcluded(this->LocalGenerators[0], gtarget)) { depends.clear(); depends.push_back(localName); diff --git a/Source/cmGlobalVisualStudioGenerator.cxx b/Source/cmGlobalVisualStudioGenerator.cxx index b69fc65..c38a35a 100644 --- a/Source/cmGlobalVisualStudioGenerator.cxx +++ b/Source/cmGlobalVisualStudioGenerator.cxx @@ -112,17 +112,19 @@ bool cmGlobalVisualStudioGenerator::Compute() for(std::vector<cmLocalGenerator*>::iterator i = gen.begin(); i != gen.end(); ++i) { - cmTargets& targets = (*i)->GetMakefile()->GetTargets(); - for(cmTargets::iterator t = targets.begin(); + cmGeneratorTargetsType targets = + (*i)->GetMakefile()->GetGeneratorTargets(); + for(cmGeneratorTargetsType::iterator t = targets.begin(); t != targets.end(); ++t) { - if (t->second.GetType() == cmTarget::GLOBAL_TARGET) + if (t->second->GetType() == cmTarget::GLOBAL_TARGET + || t->first->IsImported()) { continue; } if(!this->IsExcluded(gen[0], t->second)) { - allBuild->AddUtility(t->second.GetName()); + allBuild->AddUtility(t->second->GetName()); } } } diff --git a/Source/cmLocalNinjaGenerator.cxx b/Source/cmLocalNinjaGenerator.cxx index 9889bd4..cfca418 100644 --- a/Source/cmLocalNinjaGenerator.cxx +++ b/Source/cmLocalNinjaGenerator.cxx @@ -90,7 +90,7 @@ void cmLocalNinjaGenerator::Generate() // Add the target to "all" if required. if (!this->GetGlobalNinjaGenerator()->IsExcluded( this->GetGlobalNinjaGenerator()->GetLocalGenerators()[0], - *t->second->Target)) + t->second)) this->GetGlobalNinjaGenerator()->AddDependencyToAll(t->second->Target); delete tg; } @@ -193,16 +193,14 @@ void cmLocalNinjaGenerator::WriteProjectHeader(std::ostream& os) void cmLocalNinjaGenerator::WriteNinjaRequiredVersion(std::ostream& os) { // Default required version - // Ninja generator uses 'deps' and 'msvc_deps_prefix' introduced in 1.3 - std::string requiredVersion = "1.3"; + std::string requiredVersion = + this->GetGlobalNinjaGenerator()->RequiredNinjaVersion(); // Ninja generator uses the 'console' pool if available (>= 1.5) - std::string usedVersion = this->GetGlobalNinjaGenerator()->ninjaVersion(); - if(cmSystemTools::VersionCompare(cmSystemTools::OP_LESS, - usedVersion.c_str(), - "1.5") == false) + if(this->GetGlobalNinjaGenerator()->SupportsConsolePool()) { - requiredVersion = "1.5"; + requiredVersion = + this->GetGlobalNinjaGenerator()->RequiredNinjaVersionForConsolePool(); } cmGlobalNinjaGenerator::WriteComment(os, diff --git a/Source/cmMakefile.h b/Source/cmMakefile.h index 27e5bce..1c4da00 100644 --- a/Source/cmMakefile.h +++ b/Source/cmMakefile.h @@ -114,10 +114,6 @@ public: bool GetIsSourceFileTryCompile() const; - ///! Get the current makefile generator. - cmLocalGenerator* GetLocalGenerator() const - { return this->LocalGenerator;} - /** * Help enforce global target name uniqueness. */ diff --git a/Source/cmcmd.cxx b/Source/cmcmd.cxx index 71f47f3..7bee0ea 100644 --- a/Source/cmcmd.cxx +++ b/Source/cmcmd.cxx @@ -1468,18 +1468,24 @@ bool cmcmd::RunCommand(const char* comment, std::string output; int retCode =0; // use rc command to create .res file - cmSystemTools::RunSingleCommand(command, - &output, &output, - &retCode, 0, cmSystemTools::OUTPUT_NONE); + bool res = cmSystemTools::RunSingleCommand(command, + &output, &output, + &retCode, 0, + cmSystemTools::OUTPUT_NONE); // always print the output of the command, unless // it is the dumb rc command banner, but if the command // returned an error code then print the output anyway as // the banner may be mixed with some other important information. if(output.find("Resource Compiler Version") == output.npos - || retCode !=0) + || !res || retCode) { std::cout << output; } + if (!res) + { + std::cout << comment << " failed to run." << std::endl; + return false; + } // if retCodeOut is requested then always return true // and set the retCodeOut to retCode if(retCodeOut) @@ -1593,7 +1599,10 @@ int cmcmd::VisualStudioLinkIncremental(std::vector<std::string>& args, mtCommand.push_back(tempManifest); // now run mt.exe to create the final manifest file int mtRet =0; - cmcmd::RunCommand("MT", mtCommand, verbose, &mtRet); + if(!cmcmd::RunCommand("MT", mtCommand, verbose, &mtRet)) + { + return -1; + } // if mt returns 0, then the manifest was not changed and // we do not need to do another link step if(mtRet == 0) |