summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2018-06-08 13:34:07 (GMT)
committerKitware Robot <kwrobot@kitware.com>2018-06-08 13:34:26 (GMT)
commit4d1a643481e5fb1dd780c18124c1c6bf3d6e0e23 (patch)
treed20207d6b6deb3949dbd11c8a2377598e456230c
parent7766e57ff0ec4c9e5a38a3736d9cf5c710fa5a76 (diff)
parentaeda8fccebd6c6df2478a1a9d87cd0bc0f644190 (diff)
downloadCMake-4d1a643481e5fb1dd780c18124c1c6bf3d6e0e23.zip
CMake-4d1a643481e5fb1dd780c18124c1c6bf3d6e0e23.tar.gz
CMake-4d1a643481e5fb1dd780c18124c1c6bf3d6e0e23.tar.bz2
Merge topic 'CMakePackageConfigHelpers-doc'
aeda8fcceb Help: Package without components should use 'check_required_components' too Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !2138
-rw-r--r--Modules/CMakePackageConfigHelpers.cmake16
1 files changed, 9 insertions, 7 deletions
diff --git a/Modules/CMakePackageConfigHelpers.cmake b/Modules/CMakePackageConfigHelpers.cmake
index e37f34f..790d408 100644
--- a/Modules/CMakePackageConfigHelpers.cmake
+++ b/Modules/CMakePackageConfigHelpers.cmake
@@ -102,13 +102,15 @@
# into the ``FooConfig.cmake`` file.
#
# ``check_required_components(<package_name>)`` should be called at the end of
-# the ``FooConfig.cmake`` file if the package supports components. This macro
-# checks whether all requested, non-optional components have been found, and if
-# this is not the case, sets the ``Foo_FOUND`` variable to ``FALSE``, so that
-# the package is considered to be not found. It does that by testing the
-# ``Foo_<Component>_FOUND`` variables for all requested required components.
-# When using the ``NO_CHECK_REQUIRED_COMPONENTS_MACRO`` option, this macro is
-# not generated into the ``FooConfig.cmake`` file.
+# the ``FooConfig.cmake`` file. This macro checks whether all requested,
+# non-optional components have been found, and if this is not the case, sets
+# the ``Foo_FOUND`` variable to ``FALSE``, so that the package is considered to
+# be not found. It does that by testing the ``Foo_<Component>_FOUND``
+# variables for all requested required components. This macro should be
+# called even if the package doesn't provide any components to make sure
+# users are not specifying components erroneously. When using the
+# ``NO_CHECK_REQUIRED_COMPONENTS_MACRO`` option, this macro is not generated
+# into the ``FooConfig.cmake`` file.
#
# For an example see below the documentation for
# :command:`write_basic_package_version_file()`.