summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalGenerator.cxx
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2005-04-29 15:49:18 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2005-04-29 15:49:18 (GMT)
commit61d0a75d11c2ff93c972adeaa28a08f6314d5c07 (patch)
treef15d0d19a5b479c5dbdb1a91b5f75ec51f53d6b1 /Source/cmGlobalGenerator.cxx
parent48702f8a8d5c44a7b5f5a848ac83efde3edbb469 (diff)
downloadCMake-61d0a75d11c2ff93c972adeaa28a08f6314d5c07.zip
CMake-61d0a75d11c2ff93c972adeaa28a08f6314d5c07.tar.gz
CMake-61d0a75d11c2ff93c972adeaa28a08f6314d5c07.tar.bz2
ENH: Add option to ignore errors. Only works on make
Diffstat (limited to 'Source/cmGlobalGenerator.cxx')
-rw-r--r--Source/cmGlobalGenerator.cxx19
1 files changed, 10 insertions, 9 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 17bfc01..c473def 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -651,7 +651,8 @@ int cmGlobalGenerator::TryCompile(const char *srcdir, const char *bindir,
}
std::string cmGlobalGenerator::GenerateBuildCommand(const char* makeProgram,
- const char *projectName, const char *targetName, const char* config)
+ const char *projectName, const char *targetName, const char* config,
+ bool ignoreErrors)
{
// Project name and config are not used yet.
(void)projectName;
@@ -659,20 +660,20 @@ std::string cmGlobalGenerator::GenerateBuildCommand(const char* makeProgram,
std::string makeCommand = makeProgram;
makeCommand = cmSystemTools::ConvertToOutputPath(makeCommand.c_str());
- makeCommand += " ";
// Since we have full control over the invocation of nmake, let us
// make it quiet.
if ( strcmp(this->GetName(), "NMake Makefiles") == 0 )
{
- makeCommand += "/NOLOGO ";
+ makeCommand += " /NOLOGO ";
}
- if ( targetName )
+ if ( ignoreErrors )
{
- makeCommand += targetName;
+ makeCommand += " -i";
}
- else
+ if ( targetName )
{
- makeCommand += "all";
+ makeCommand += " ";
+ makeCommand += targetName;
}
return makeCommand;
}
@@ -701,7 +702,7 @@ int cmGlobalGenerator::Build(
// should we do a clean first?
if (clean)
{
- std::string cleanCommand = this->GenerateBuildCommand(makeCommandCSTR, projectName, "clean", config);
+ std::string cleanCommand = this->GenerateBuildCommand(makeCommandCSTR, projectName, "clean", config, false);
if (!cmSystemTools::RunSingleCommand(cleanCommand.c_str(), output,
&retVal, 0, false, timeout))
{
@@ -719,7 +720,7 @@ int cmGlobalGenerator::Build(
}
// now build
- std::string makeCommand = this->GenerateBuildCommand(makeCommandCSTR, projectName, target, config);
+ std::string makeCommand = this->GenerateBuildCommand(makeCommandCSTR, projectName, target, config, false);
if (!cmSystemTools::RunSingleCommand(makeCommand.c_str(), output,
&retVal, 0, false, timeout))