summaryrefslogtreecommitdiff
path: root/Source/cmFindPackageCommand.cxx
diff options
context:
space:
mode:
authorAlex Neundorf <neundorf@kde.org>2012-03-06 21:16:24 +0100
committerAlex Neundorf <neundorf@kde.org>2012-03-06 21:16:24 +0100
commitc91a54db3766aea8f8ab9d5a011db3bba67b12d4 (patch)
treee49321bc0eb4db63588a253743167e92d1b347bb /Source/cmFindPackageCommand.cxx
parentec50093be768c9fa9384cc42a4d1f331f0264b39 (diff)
downloadcmake-c91a54db3766aea8f8ab9d5a011db3bba67b12d4.tar.gz
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
Diffstat (limited to 'Source/cmFindPackageCommand.cxx')
-rw-r--r--Source/cmFindPackageCommand.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/Source/cmFindPackageCommand.cxx b/Source/cmFindPackageCommand.cxx
index 9177162724..f8139f9021 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())
{