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