summaryrefslogtreecommitdiffstats
path: root/Help/command
diff options
context:
space:
mode:
authorSylvain Joubert <joubert.sy@gmail.com>2020-03-06 13:30:01 (GMT)
committerSylvain Joubert <joubert.sy@gmail.com>2020-03-06 15:40:26 (GMT)
commitdc008095961fe4c2478d575931e8caf6c9bff92d (patch)
treed468b514eca32bf28351b91f41628ab8be64ca36 /Help/command
parentcc070e66cd9bd0d4e0ce56ad9dd307dbb854e61f (diff)
downloadCMake-dc008095961fe4c2478d575931e8caf6c9bff92d.zip
CMake-dc008095961fe4c2478d575931e8caf6c9bff92d.tar.gz
CMake-dc008095961fe4c2478d575931e8caf6c9bff92d.tar.bz2
find_*: Add support for REQUIRED keyword
In the same spirit as the REQUIRED keyword on find_package, this will stop cmake execution with an error on a failed find_program, find_file, find_path or find_library.
Diffstat (limited to 'Help/command')
-rw-r--r--Help/command/FIND_XXX.txt9
1 files changed, 7 insertions, 2 deletions
diff --git a/Help/command/FIND_XXX.txt b/Help/command/FIND_XXX.txt
index 42bf52b..cebe051 100644
--- a/Help/command/FIND_XXX.txt
+++ b/Help/command/FIND_XXX.txt
@@ -15,6 +15,7 @@ The general signature is:
[PATHS path1 [path2 ... ENV var]]
[PATH_SUFFIXES suffix1 [suffix2 ...]]
[DOC "cache documentation string"]
+ [REQUIRED]
[NO_DEFAULT_PATH]
[NO_PACKAGE_ROOT_PATH]
[NO_CMAKE_PATH]
@@ -31,8 +32,9 @@ A cache entry named by ``<VAR>`` is created to store the result
of this command.
If the |SEARCH_XXX| is found the result is stored in the variable
and the search will not be repeated unless the variable is cleared.
-If nothing is found, the result will be
-``<VAR>-NOTFOUND``, and the search will be attempted again the
+If nothing is found, the result will be ``<VAR>-NOTFOUND``.
+The ``REQUIRED`` option stops processing with an error message if nothing
+is found, otherwise the search will be attempted again the
next time |FIND_XXX| is invoked with the same variable.
Options include:
@@ -57,6 +59,9 @@ Options include:
``DOC``
Specify the documentation string for the ``<VAR>`` cache entry.
+``REQUIRED``
+ Stop processing with an error message if nothing is found.
+
If ``NO_DEFAULT_PATH`` is specified, then no additional paths are
added to the search.
If ``NO_DEFAULT_PATH`` is not specified, the search process is as follows: