summaryrefslogtreecommitdiffstats
path: root/Help
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-03-09 13:15:32 (GMT)
committerKitware Robot <kwrobot@kitware.com>2020-03-09 13:15:38 (GMT)
commitefa30023b4056a4c17e80d7a86bc2506660c68a7 (patch)
treedd8aafeadf768e72dcbf3baf66b8ad2732ec954f /Help
parentbb9dc34800765fe8b572bf127b9460c03c99dbd1 (diff)
parentdc008095961fe4c2478d575931e8caf6c9bff92d (diff)
downloadCMake-efa30023b4056a4c17e80d7a86bc2506660c68a7.zip
CMake-efa30023b4056a4c17e80d7a86bc2506660c68a7.tar.gz
CMake-efa30023b4056a4c17e80d7a86bc2506660c68a7.tar.bz2
Merge topic 'required_find_commands'
dc00809596 find_*: Add support for REQUIRED keyword cc070e66cd cmFindBase: Use in-class member initialization Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4435
Diffstat (limited to 'Help')
-rw-r--r--Help/command/FIND_XXX.txt9
-rw-r--r--Help/release/dev/required_find_commands.rst6
2 files changed, 13 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:
diff --git a/Help/release/dev/required_find_commands.rst b/Help/release/dev/required_find_commands.rst
new file mode 100644
index 0000000..cc2bf02
--- /dev/null
+++ b/Help/release/dev/required_find_commands.rst
@@ -0,0 +1,6 @@
+required_find_commands
+----------------------
+
+* The :command:`find_program`, :command:`find_library`, :command:`find_path`
+ and :command:`find_file` commands gained a new ``REQUIRED`` option that will
+ stop processing with an error message if nothing is found.