Преглед изворни кода

find_package: error out if REQUIRED Config has not been found

If in Config mode a configuration file could not be found, cmake printed
an error, but did not actually stop processing. With SetFatalErrorOccured
it does.

Alex
Alex Neundorf пре 13 година
родитељ
комит
c91a54db37
1 измењених фајлова са 4 додато и 0 уклоњено
  1. 4 0
      Source/cmFindPackageCommand.cxx

+ 4 - 0
Source/cmFindPackageCommand.cxx

@@ -1062,6 +1062,10 @@ bool cmFindPackageCommand::HandlePackageMode()
 
     this->Makefile->IssueMessage(
       this->Required? cmake::FATAL_ERROR : cmake::WARNING, e.str());
+    if (this->Required)
+      {
+      cmSystemTools::SetFatalErrorOccured();
+      }
 
     if (!aw.str().empty())
       {