From a843439d14ce331da2b02f2a5c0e53faf3af0646 Mon Sep 17 00:00:00 2001 From: Brad King Date: Wed, 14 May 2003 12:06:40 -0400 Subject: BUG: Work-around for SGI MipsPro bug where #error doesn't return an error to make. --- Source/cmGlobalGenerator.cxx | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'Source') diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx index 14ecd22eff..3e72f53c2e 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; } -- cgit v1.2.1