diff options
-rw-r--r-- | Source/cmGlobalGenerator.cxx | 9 |
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; } |