summaryrefslogtreecommitdiffstats
path: root/Help
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2013-11-08 15:33:14 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2013-11-08 15:33:14 (GMT)
commit2053e0cd51810d434ec4563186d5e2792d1c9cab (patch)
tree9941a15086825e24aac3d8b436ba5cd0398b83ec /Help
parent064e6d32728a73edcf44d6b52572dbec19e0c90d (diff)
parent596b2a8c0820bed8195e2377927a18cf2d76727c (diff)
downloadCMake-2053e0cd51810d434ec4563186d5e2792d1c9cab.zip
CMake-2053e0cd51810d434ec4563186d5e2792d1c9cab.tar.gz
CMake-2053e0cd51810d434ec4563186d5e2792d1c9cab.tar.bz2
Merge topic 'tll-target-policies'
596b2a8 Disallow linking to utility targets (#13902). 301bb5c Disallow link-to-self (#13947). 05f5fde Disallow invalid target names (#13140)
Diffstat (limited to 'Help')
-rw-r--r--Help/manual/cmake-policies.7.rst3
-rw-r--r--Help/policy/CMP0037.rst21
-rw-r--r--Help/policy/CMP0038.rst16
-rw-r--r--Help/policy/CMP0039.rst17
4 files changed, 57 insertions, 0 deletions
diff --git a/Help/manual/cmake-policies.7.rst b/Help/manual/cmake-policies.7.rst
index 5879a30..2430ee9 100644
--- a/Help/manual/cmake-policies.7.rst
+++ b/Help/manual/cmake-policies.7.rst
@@ -70,3 +70,6 @@ All Policies
/policy/CMP0034
/policy/CMP0035
/policy/CMP0036
+ /policy/CMP0037
+ /policy/CMP0038
+ /policy/CMP0039
diff --git a/Help/policy/CMP0037.rst b/Help/policy/CMP0037.rst
new file mode 100644
index 0000000..5df3c00
--- /dev/null
+++ b/Help/policy/CMP0037.rst
@@ -0,0 +1,21 @@
+CMP0037
+-------
+
+Target names should match a validity pattern.
+
+CMake 2.8.12 and lower allowed creating targets using :command:`add_library` and
+:command:`add_executable` with unrestricted choice for the target name. Newer
+cmake features such as :manual:`cmake-generator-expressions(7)` and some
+diagnostics expect target names to match a restricted pattern.
+
+Target names may contain upper and lower case letters, numbers, the underscore
+character (_), dot(.), plus(+) and minus(-). As a special case, ALIAS
+targets and INTERFACE library targets may contain two consequtive colons.
+
+The OLD behavior for this policy is to allow creating targets which do not match
+the validity pattern. The NEW behavior for this policy is to report an error
+if an add_* command is used with an invalid target name.
+
+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.
diff --git a/Help/policy/CMP0038.rst b/Help/policy/CMP0038.rst
new file mode 100644
index 0000000..c448ed6
--- /dev/null
+++ b/Help/policy/CMP0038.rst
@@ -0,0 +1,16 @@
+CMP0038
+-------
+
+Targets may not link directly to themselves
+
+CMake 2.8.12 and lower allowed a build target to link to itself directly with
+a :command:`target_link_libraries` call. This is an indicator of a bug in
+user code.
+
+The OLD behavior for this policy is to ignore targets which list themselves
+in their own link implementation. The NEW behavior for this policy is to
+report an error if a target attempts to link to itself.
+
+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.
diff --git a/Help/policy/CMP0039.rst b/Help/policy/CMP0039.rst
new file mode 100644
index 0000000..1d20f0c
--- /dev/null
+++ b/Help/policy/CMP0039.rst
@@ -0,0 +1,17 @@
+CMP0039
+-------
+
+Utility targets may not have link dependencies
+
+CMake 2.8.12 and lower allowed using utility targets in the left hand side
+position of the :command:`target_link_libraries` command. This is an indicator
+of a bug in user code.
+
+The OLD behavior for this policy is to ignore attempts to set the link
+libraries of utility targets. The NEW behavior for this policy is to
+report an error if an attempt is made to set the link libraries of a
+utility target.
+
+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.