CMP0040.rst 831 B

123456789101112131415161718192021
  1. CMP0040
  2. -------
  3. .. |REMOVED_IN_CMAKE_VERSION| replace:: 4.0
  4. .. include:: include/REMOVED_PROLOGUE.rst
  5. The target in the ``TARGET`` signature of :command:`add_custom_command`
  6. must exist and must be defined in the current directory.
  7. CMake 2.8.12 and lower silently ignored a custom command created with
  8. the ``TARGET`` signature of :command:`add_custom_command`
  9. if the target is unknown or was defined outside the current directory.
  10. The ``OLD`` behavior for this policy is to ignore custom commands
  11. for unknown targets. The ``NEW`` behavior for this policy is to report
  12. an error if the target referenced in :command:`add_custom_command` is
  13. unknown or was defined outside the current directory.
  14. .. |INTRODUCED_IN_CMAKE_VERSION| replace:: 3.0
  15. .. |WARNED_OR_DID_NOT_WARN| replace:: warned
  16. .. include:: include/REMOVED_EPILOGUE.rst