summaryrefslogtreecommitdiffstats
path: root/Help/policy
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2021-12-20 15:03:17 (GMT)
committerBrad King <brad.king@kitware.com>2021-12-20 17:14:07 (GMT)
commit37af6c33116af75a9538861268edab0ddc202d79 (patch)
tree8d1ec64b38370df7abf070af5cebb34638cf6ae4 /Help/policy
parent5134f099a32e2eb0d557ad86dabd8b811709c94d (diff)
downloadCMake-37af6c33116af75a9538861268edab0ddc202d79.zip
CMake-37af6c33116af75a9538861268edab0ddc202d79.tar.gz
CMake-37af6c33116af75a9538861268edab0ddc202d79.tar.bz2
target_link_libraries: Optionally require only target names
Optionally verify that items in `LINK_LIBRARIES` and `INTERFACE_LINK_LIBRARIES` that can be target names are actually target names. Add a `LINK_LIBRARIES_ONLY_TARGETS` target property and corresponding `CMAKE_LINK_LIBRARIES_ONLY_TARGETS` variable to enable this new check. Fixes: #22858
Diffstat (limited to 'Help/policy')
-rw-r--r--Help/policy/CMP0028.rst2
1 files changed, 2 insertions, 0 deletions
diff --git a/Help/policy/CMP0028.rst b/Help/policy/CMP0028.rst
index ab38229..dcd39d8 100644
--- a/Help/policy/CMP0028.rst
+++ b/Help/policy/CMP0028.rst
@@ -13,6 +13,8 @@ on disk. Previously, if a target was not found with a matching name, the name
was considered to refer to a file on disk. This can lead to confusing error
messages if there is a typo in what should be a target name.
+See also the :prop_tgt:`LINK_LIBRARIES_ONLY_TARGETS` target property.
+
The ``OLD`` behavior for this policy is to search for targets, then files on
disk, even if the search term contains double-colons. The ``NEW`` behavior
for this policy is to issue a ``FATAL_ERROR`` if a link dependency contains