title: Policy CMP0026 is not set: Disallow use of the LOCATION target property
body: <p>I have a cmake project with a bunch of different targets in it. First it builds an executable that is used to process some data files (lets call this DataProcessor). Then it processes those data files with the executable. Then, a second executable (we'll call this MyApp) is built and it runs with the processed data files. </p>
  
  <p>There is also a target that takes all the processed data files and MyApp and bundles them up in a tar file so we can distribute them. </p>
  
  <p>In my CMakeLists.txt file there I have the following lines:</p>
  
  <pre><code>get_target_property(DATA_PROCESSOR_EXE DataProcessor LOCATION)
  get_target_property(MY_APP_EXE MyApp LOCATION)
  </code></pre>
  
  <p>I need these to run various other commands in my CMakeLists file. For example, the DATA_PROCESSOR_EXE is used in the custom command to process the data files, like so:</p>
  
  <pre><code>add_custom_command(
    OUTPUT ${DATA_OUT}
    COMMAND ${DATA_PROCESSOR_EXE} -o ${DATA_OUT} ${DATA_IN}
    DEPENDS DataProcessor)
  </code></pre>
  
  <p>And when I bundle everything up I use MyApp's location as well:</p>
  
  <pre><code># Convert executable paths to relative paths.
  string(REPLACE "${CMAKE_SOURCE_DIR}/" "" MY_APP_EXE_RELATIVE
         "${MY_APP_EXE}")
  string(REPLACE "${CMAKE_SOURCE_DIR}/" "" DATA_PROCESSOR_EXE_RELATIVE
         "${DATA_PROCESSOR_EXE}")
  
  # The set of files and folders to export
  set(EXPORT_FILES
      assets
      src/rawdata
      ${MY_APP_EXE_RELATIVE}
      ${DATA_PROCESSOR_EXE_RELATIVE})
  
  # Create a zipped tar of all the necessary files to run the game.
  add_custom_target(export
    COMMAND cd ${CMAKE_SOURCE_DIR} &amp;&amp; tar -czvf myapp.tar.gz ${EXPORT_FILES}
    DEPENDS splat
    WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/..)
  </code></pre>
  
  <p>The problem is that trying to get the target's location property now causes a warning saying:</p>
  
  <pre><code>CMake Warning (dev) at CMakeLists.txt:86 (get_target_property):
    Policy CMP0026 is not set: Disallow use of the LOCATION target property.
    Run "cmake --help-policy CMP0026" for policy details.  Use the cmake_policy
    command to set the policy and suppress this warning.
  
    The LOCATION property should not be read from target "DataProcessor".  
    Use the target name directly with add_custom_command, or use the generator
    expression $&lt;TARGET_FILE&gt;, as appropriate.
  </code></pre>
  
  <p>I don't understand how it wants me to use <code>add_custome_command</code> or what it means by <code>use the generator expression $&lt;TARGET_FILE&gt;</code></p>