summaryrefslogtreecommitdiffstats
path: root/Source/cmFindPackageCommand.h
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2004-04-19 14:36:42 (GMT)
committerBrad King <brad.king@kitware.com>2004-04-19 14:36:42 (GMT)
commitd4214bc5659e3f80b530b9e253525ae156618cb5 (patch)
treef1490d78078323bdfc9df60d36e763f2f67b9b64 /Source/cmFindPackageCommand.h
parent55a71ba572c54dbb3485a76e9615c1c8bf688fd4 (diff)
downloadCMake-d4214bc5659e3f80b530b9e253525ae156618cb5.zip
CMake-d4214bc5659e3f80b530b9e253525ae156618cb5.tar.gz
CMake-d4214bc5659e3f80b530b9e253525ae156618cb5.tar.bz2
ENH#696: Adding REQUIRED option to FIND_PACKAGE command. It will terminate the cmake configure step if the package is not found.
Diffstat (limited to 'Source/cmFindPackageCommand.h')
-rw-r--r--Source/cmFindPackageCommand.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/Source/cmFindPackageCommand.h b/Source/cmFindPackageCommand.h
index 08545fa..8a90a1d 100644
--- a/Source/cmFindPackageCommand.h
+++ b/Source/cmFindPackageCommand.h
@@ -63,7 +63,7 @@ public:
virtual const char* GetFullDocumentation()
{
return
- " FIND_PACKAGE(<name> [major.minor] [QUIET])\n"
+ " FIND_PACKAGE(<name> [major.minor] [QUIET] [REQUIRED])\n"
"Finds and loads settings from an external project. <name>_FOUND will "
"be set to indicate whether the package was found. Settings that "
"can be used when <name>_FOUND is true are package-specific. The "
@@ -80,12 +80,13 @@ public:
"will generate an error describing the problem unless the QUIET "
"argument is specified. If <name>_DIR has been set to a directory "
"not containing a \"<name>Config.cmake\" file, an error is always "
- "generated.";
+ "generated. If REQUIRED is specified and the package is not found, "
+ "a FATAL_ERROR is generated and the configure step stops executing.";
}
cmTypeMacro(cmFindPackageCommand, cmCommand);
private:
- bool FindModule(bool& found, bool quiet);
+ bool FindModule(bool& found, bool quiet, bool required);
bool FindConfig();
std::string SearchForConfig() const;
bool ReadListFile(const char* f);