Răsfoiți Sursa

BUG: Work-around for SGI MipsPro bug where #error doesn't return an error to make.

Brad King 23 ani în urmă
părinte
comite
a843439d14
1 a modificat fișierele cu 9 adăugiri și 0 ștergeri
  1. 9 0
      Source/cmGlobalGenerator.cxx

+ 9 - 0
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;
 }