summaryrefslogtreecommitdiffstats
path: root/Help/policy/CMP0057.rst
diff options
context:
space:
mode:
authorNils Gladitz <nilsgladitz@gmail.com>2015-03-09 11:12:13 (GMT)
committerNils Gladitz <nilsgladitz@gmail.com>2015-03-09 11:45:38 (GMT)
commit242c396656783b1b3d542b14bc62710a46a87518 (patch)
tree8d460b76a2b377433b774815b1914d9b4b86043a /Help/policy/CMP0057.rst
parentbdb00b36133c64a36fbba7fd6c648725062b6732 (diff)
downloadCMake-242c396656783b1b3d542b14bc62710a46a87518.zip
CMake-242c396656783b1b3d542b14bc62710a46a87518.tar.gz
CMake-242c396656783b1b3d542b14bc62710a46a87518.tar.bz2
add_custom_command: Diagnose MAIN_DEPENDENCY limitation.
The new policy CMP0057 diagnoses reuse of the same MAIN_DEPENDENCY across multiple custom commands.
Diffstat (limited to 'Help/policy/CMP0057.rst')
-rw-r--r--Help/policy/CMP0057.rst21
1 files changed, 21 insertions, 0 deletions
diff --git a/Help/policy/CMP0057.rst b/Help/policy/CMP0057.rst
new file mode 100644
index 0000000..5cf0784
--- /dev/null
+++ b/Help/policy/CMP0057.rst
@@ -0,0 +1,21 @@
+CMP0057
+-------
+
+Disallow multiple ``MAIN_DEPENDENCY`` specifications for the same file.
+
+CMake 3.3 and above no longer allow the same input file to be used
+as a ``MAIN_DEPENDENCY`` in more than one custom command.
+
+Listing the same input file more than once in this context has not been
+supported by earlier versions either and would lead to build time issues
+but was not diagnosed.
+
+The ``OLD`` behavior for this policy is to allow using the same input file
+in a ``MAIN_DEPENDENCY`` specfication more than once.
+The ``NEW`` behavior is to disallow using the same input file in a
+``MAIN_DEPENDENCY`` specification more than once.
+
+This policy was introduced in CMake version 3.3.
+CMake version |release| warns when the policy is not set and uses
+``OLD`` behavior. Use the :command:`cmake_policy` command to set
+it to ``OLD`` or ``NEW`` explicitly.