summaryrefslogtreecommitdiff
path: root/Help/policy
diff options
context:
space:
mode:
authorNils Gladitz <nilsgladitz@gmail.com>2013-11-20 09:53:06 +0100
committerBrad King <brad.king@kitware.com>2013-11-21 09:24:08 -0500
commita02f3d2de00a16a68e8948db3c0de507e569f8a3 (patch)
tree065ce76b2c29a27325a0d36a8869856dbfb6dbe9 /Help/policy
parenta61025135b1c1ceea9634973b983bd3e47be8bdd (diff)
downloadcmake-a02f3d2de00a16a68e8948db3c0de507e569f8a3.tar.gz
Add policy CMP0040 to disallow custom commands on missing targets
Diffstat (limited to 'Help/policy')
-rw-r--r--Help/policy/CMP0040.rst16
1 files changed, 16 insertions, 0 deletions
diff --git a/Help/policy/CMP0040.rst b/Help/policy/CMP0040.rst
new file mode 100644
index 0000000000..99b54ff31d
--- /dev/null
+++ b/Help/policy/CMP0040.rst
@@ -0,0 +1,16 @@
+CMP0040
+-------
+
+The target in the TARGET signature of add_custom_command() must exist.
+
+CMake 2.8.12 and lower silently ignored a custom command created with
+the TARGET signature of :command:`add_custom_command`
+if the target is unknown.
+
+The OLD behavior for this policy is to ignore custom commands
+for unknown targets. The NEW behavior for this policy is to report and error
+if the target referenced in :command:`add_custom_command` is unknown.
+
+This policy was introduced in CMake version 3.0.0. CMake version
+|release| warns when the policy is not set and uses OLD behavior. Use
+the cmake_policy command to set it to OLD or NEW explicitly.