summaryrefslogtreecommitdiffstats
path: root/Help/prop_tgt/EXPORT_PROPERTIES.rst
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-07-20 17:19:26 (GMT)
committerBrad King <brad.king@kitware.com>2020-08-07 12:46:32 (GMT)
commit439191313363caea225a508634495c50d4cc60dd (patch)
treeeb1156c1fbf93b4a9ea23ec812ba49ef7a195846 /Help/prop_tgt/EXPORT_PROPERTIES.rst
parentafb998704e67d3d3ce5b24c112cb06e770fca78d (diff)
downloadCMake-439191313363caea225a508634495c50d4cc60dd.zip
CMake-439191313363caea225a508634495c50d4cc60dd.tar.gz
CMake-439191313363caea225a508634495c50d4cc60dd.tar.bz2
Add INTERFACE libraries to generated buildsystem if they have SOURCES
INTERFACE libraries were created with the intention of collecting usage requirements for use by other targets via `target_link_libraries`. Therefore they were not allowed to have SOURCES and were not included in the generated buildsystem. In practice, this has become limiting: * Header-only libraries do have sources, they just do not compile. Developers should be able to edit those sources (the header files) in their IDE. * Header-only libraries may need to generate some of their header files via custom commands. Some projects work around these limitations by pairing each interface library with an `add_custom_target` that makes the header files and custom commands appear in the generated buildsystem and in IDEs. Lift such limitations by allowing INTERFACE libraries to have SOURCES. For those with sources, add a corresponding build target to the generated buildsystem. Fixes: #19145
Diffstat (limited to 'Help/prop_tgt/EXPORT_PROPERTIES.rst')
-rw-r--r--Help/prop_tgt/EXPORT_PROPERTIES.rst8
1 files changed, 8 insertions, 0 deletions
diff --git a/Help/prop_tgt/EXPORT_PROPERTIES.rst b/Help/prop_tgt/EXPORT_PROPERTIES.rst
index 34c054f..2d54f8b 100644
--- a/Help/prop_tgt/EXPORT_PROPERTIES.rst
+++ b/Help/prop_tgt/EXPORT_PROPERTIES.rst
@@ -14,3 +14,11 @@ Properties starting with ``INTERFACE_`` or ``IMPORTED_`` are not allowed as
they are reserved for internal CMake use.
Properties containing generator expressions are also not allowed.
+
+.. note::
+
+ Since CMake 3.19, :ref:`Interface Libraries` may have arbitrary
+ target properties. If a project exports an interface library
+ with custom properties, the resulting package may not work with
+ dependents configured by older versions of CMake that reject the
+ custom properties.