Skip to content

target_link_libraries: Optionally require only target names

Brad King requested to merge brad.king/cmake:link-only-targets into master

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 (closed)

Merge request reports