CMP0062.rst 1.2 KB

1234567891011121314151617181920212223242526272829
  1. CMP0062
  2. -------
  3. Disallow install() of export() result.
  4. The :command:`export()` command generates a file containing
  5. :ref:`Imported Targets`, which is suitable for use from the build
  6. directory. It is not suitable for installation because it contains absolute
  7. paths to buildsystem locations, and is particular to a single build
  8. configuration.
  9. The :command:`install(EXPORT)` generates and installs files which contain
  10. :ref:`Imported Targets`. These files are generated with relative paths
  11. (unless the user specifies absolute paths), and are designed for
  12. multi-configuration use. See :ref:`Creating Packages` for more.
  13. CMake 3.3 no longer allows the use of the :command:`install(FILES)` command
  14. with the result of the :command:`export()` command.
  15. The ``OLD`` behavior for this policy is to allow installing the result of
  16. an :command:`export()` command. The ``NEW`` behavior for this policy is
  17. not to allow installing the result of an :command:`export()` command.
  18. This policy was introduced in CMake version 3.3. CMake version
  19. |release| warns when the policy is not set and uses ``OLD`` behavior. Use
  20. the :command:`cmake_policy()` command to set it to ``OLD`` or ``NEW``
  21. explicitly.
  22. .. include:: DEPRECATED.txt