CMP0026.rst 1.3 KB

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