summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2003-05-14 16:06:40 (GMT)
committerBrad King <brad.king@kitware.com>2003-05-14 16:06:40 (GMT)
commita843439d14ce331da2b02f2a5c0e53faf3af0646 (patch)
tree31918b9f640580f37710a8dbfff52565fd5f5437 /Source
parent9b73353baa4cc36ad72fbcf620d02548d8e127a5 (diff)
downloadCMake-a843439d14ce331da2b02f2a5c0e53faf3af0646.zip
CMake-a843439d14ce331da2b02f2a5c0e53faf3af0646.tar.gz
CMake-a843439d14ce331da2b02f2a5c0e53faf3af0646.tar.bz2
BUG: Work-around for SGI MipsPro bug where #error doesn't return an error to make.
Diffstat (limited to 'Source')
-rw-r--r--Source/cmGlobalGenerator.cxx9
1 files changed, 9 insertions, 0 deletions
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 14ecd22..3e72f53 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -476,6 +476,15 @@ int cmGlobalGenerator::TryCompile(const char *, const char *bindir,
cmSystemTools::ChangeDirectory(cwd.c_str());
return 1;
}
+
+ // The SGI MipsPro 7.3 compiler does not return an error code when
+ // the source has a #error in it! This is a work-around for such
+ // compilers.
+ if((retVal == 0) && (output->find("#error") != std::string::npos))
+ {
+ retVal = 1;
+ }
+
cmSystemTools::ChangeDirectory(cwd.c_str());
return retVal;
}