summaryrefslogtreecommitdiffstats
path: root/Help/manual/cmake-packages.7.rst
diff options
context:
space:
mode:
authorRobert Maynard <robert.maynard@kitware.com>2018-11-13 14:39:27 (GMT)
committerBrad King <brad.king@kitware.com>2019-03-15 14:24:47 (GMT)
commit9bede5c4cecd71fba7ce6a0687c4a68e1c84a54b (patch)
tree57e94c1e43b25ea3706b55cccff48d57b25dfc6d /Help/manual/cmake-packages.7.rst
parent0df31d99ae44e1e151feb4df977a4332833ea872 (diff)
downloadCMake-9bede5c4cecd71fba7ce6a0687c4a68e1c84a54b.zip
CMake-9bede5c4cecd71fba7ce6a0687c4a68e1c84a54b.tar.gz
CMake-9bede5c4cecd71fba7ce6a0687c4a68e1c84a54b.tar.bz2
export: Disable PACKAGE mode user package registry by default
The user package registry populated by the `export()` command causes side effects outside the build and source directories. Such effects should be opt-in rather than op-out. Introduce a policy to change default behavior of `export(PACKAGE)` to do nothing.
Diffstat (limited to 'Help/manual/cmake-packages.7.rst')
-rw-r--r--Help/manual/cmake-packages.7.rst17
1 files changed, 11 insertions, 6 deletions
diff --git a/Help/manual/cmake-packages.7.rst b/Help/manual/cmake-packages.7.rst
index 876ca84..bbe742e 100644
--- a/Help/manual/cmake-packages.7.rst
+++ b/Help/manual/cmake-packages.7.rst
@@ -647,12 +647,17 @@ Disabling the Package Registry
In some cases using the Package Registries is not desirable. CMake
allows one to disable them using the following variables:
- * :variable:`CMAKE_EXPORT_NO_PACKAGE_REGISTRY` disables the
- :command:`export(PACKAGE)` command.
- * :variable:`CMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY` disables the
- User Package Registry in all the :command:`find_package` calls.
- * :variable:`CMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY` disables
- the System Package Registry in all the :command:`find_package` calls.
+* The :command:`export(PACKAGE)` command does not populate the user
+ package registry when :policy:`CMP0090` is set to ``NEW`` unless the
+ :variable:`CMAKE_EXPORT_PACKAGE_REGISTRY` variable explicitly enables it.
+ When :policy:`CMP0090` is *not* set to ``NEW`` then
+ :command:`export(PACKAGE)` populates the user package registry unless
+ the :variable:`CMAKE_EXPORT_NO_PACKAGE_REGISTRY` variable explicitly
+ disables it.
+* :variable:`CMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY` disables the
+ User Package Registry in all the :command:`find_package` calls.
+* :variable:`CMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY` disables
+ the System Package Registry in all the :command:`find_package` calls.
Package Registry Example
------------------------