diff --git a/Source/cmFindPackageCommand.cxx b/Source/cmFindPackageCommand.cxx index 917716272..f8139f902 100644 --- a/Source/cmFindPackageCommand.cxx +++ b/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()) {