CMP0087.rst 1.3 KB

12345678910111213141516171819202122232425262728293031
  1. CMP0087
  2. -------
  3. .. versionadded:: 3.14
  4. :command:`install(CODE)` and :command:`install(SCRIPT)` support generator
  5. expressions.
  6. In CMake 3.13 and earlier, :command:`install(CODE)` and
  7. :command:`install(SCRIPT)` did not evaluate generator expressions. CMake 3.14
  8. and later will evaluate generator expressions for :command:`install(CODE)` and
  9. :command:`install(SCRIPT)`.
  10. The ``OLD`` behavior of this policy is for :command:`install(CODE)` and
  11. :command:`install(SCRIPT)` to not evaluate generator expressions. The ``NEW``
  12. behavior is to evaluate generator expressions for :command:`install(CODE)` and
  13. :command:`install(SCRIPT)`.
  14. Note that it is the value of this policy setting at the end of the directory
  15. scope that is important, not its setting at the time of the call to
  16. :command:`install(CODE)` or :command:`install(SCRIPT)`. This has implications
  17. for calling these commands from places that have their own policy scope but not
  18. their own directory scope (e.g. from files brought in via :command:`include()`
  19. rather than :command:`add_subdirectory()`).
  20. This policy was introduced in CMake version 3.14. CMake version
  21. |release| warns when the policy is not set and uses ``OLD`` behavior.
  22. Use the :command:`cmake_policy` command to set it to ``OLD`` or ``NEW``
  23. explicitly.
  24. .. include:: DEPRECATED.txt