CMake/Help/variable/CMAKE_EXPORT_NO_PACKAGE_REGISTRY.rst
Robert Maynard 9bede5c4ce 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.
2019-03-15 10:24:47 -04:00

17 lines
621 B
ReStructuredText

CMAKE_EXPORT_NO_PACKAGE_REGISTRY
--------------------------------
Disable the :command:`export(PACKAGE)` command when :policy:`CMP0090`
is not set to ``NEW``.
In some cases, for example for packaging and for system wide
installations, it is not desirable to write the user package registry.
If the ``CMAKE_EXPORT_NO_PACKAGE_REGISTRY`` variable is enabled,
the :command:`export(PACKAGE)` command will do nothing.
If :policy:`CMP0090` is set to ``NEW`` this variable does nothing, and the
:variable:`CMAKE_EXPORT_PACKAGE_REGISTRY` variable controls the behavior
instead.
See also :ref:`Disabling the Package Registry`.