CMP0087.rst 1.3 KB

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