CMP0026.rst 1.2 KB

1234567891011121314151617181920212223242526272829
  1. CMP0026
  2. -------
  3. Disallow use of the LOCATION property for build targets.
  4. CMake 2.8.12 and lower allowed reading the :prop_tgt:`LOCATION` target
  5. property (and configuration-specific variants) to
  6. determine the eventual location of build targets. This relies on the
  7. assumption that all necessary information is available at
  8. configure-time to determine the final location and filename of the
  9. target. However, this property is not fully determined until later at
  10. generate-time. At generate time, the :genex:`$<TARGET_FILE>` generator
  11. expression can be used to determine the eventual :prop_tgt:`LOCATION` of a target
  12. output.
  13. Code which reads the :prop_tgt:`LOCATION` target property can be ported to
  14. use the :genex:`$<TARGET_FILE>` generator expression together with the
  15. :command:`file(GENERATE)` subcommand to generate a file containing
  16. the target location.
  17. The ``OLD`` behavior for this policy is to allow reading the :prop_tgt:`LOCATION`
  18. properties from build-targets. The ``NEW`` behavior for this policy is to
  19. not to allow reading the :prop_tgt:`LOCATION` properties from build-targets.
  20. .. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.0
  21. .. |WARNS_OR_DOES_NOT_WARN| replace:: warns
  22. .. include:: STANDARD_ADVICE.txt
  23. .. include:: DEPRECATED.txt