CMP0040.rst 857 B

123456789101112131415161718192021
  1. CMP0040
  2. -------
  3. The target in the ``TARGET`` signature of :command:`add_custom_command`
  4. must exist and must be defined in the current directory.
  5. CMake 2.8.12 and lower silently ignored a custom command created with
  6. the ``TARGET`` signature of :command:`add_custom_command`
  7. if the target is unknown or was defined outside the current directory.
  8. The ``OLD`` behavior for this policy is to ignore custom commands
  9. for unknown targets. The ``NEW`` behavior for this policy is to report
  10. an error if the target referenced in :command:`add_custom_command` is
  11. unknown or was defined outside the current directory.
  12. This policy was introduced in CMake version 3.0. CMake version
  13. |release| warns when the policy is not set and uses ``OLD`` behavior.
  14. Use the :command:`cmake_policy` command to set it to ``OLD`` or
  15. ``NEW`` explicitly.
  16. .. include:: DEPRECATED.txt