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