diff options
author | Alex Neundorf <neundorf@kde.org> | 2012-03-06 20:16:24 (GMT) |
---|---|---|
committer | Alex Neundorf <neundorf@kde.org> | 2012-03-06 20:16:24 (GMT) |
commit | c91a54db3766aea8f8ab9d5a011db3bba67b12d4 (patch) | |
tree | e49321bc0eb4db63588a253743167e92d1b347bb /Source/cmFindPackageCommand.cxx | |
parent | ec50093be768c9fa9384cc42a4d1f331f0264b39 (diff) | |
download | CMake-c91a54db3766aea8f8ab9d5a011db3bba67b12d4.zip CMake-c91a54db3766aea8f8ab9d5a011db3bba67b12d4.tar.gz CMake-c91a54db3766aea8f8ab9d5a011db3bba67b12d4.tar.bz2 |
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.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Source/cmFindPackageCommand.cxx b/Source/cmFindPackageCommand.cxx index 9177162..f8139f9 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()) { |