Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add note about shared global target in CMake components #1946

Merged
merged 2 commits into from Dec 2, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 6 additions & 0 deletions reference/generators/cmake_find_package.rst
Expand Up @@ -82,3 +82,9 @@ If a recipe uses components, the targets generated will be ``<PKG-NAME>::<COMP-N
Moreover, a global target ``<PKG-NAME>::<PKG-NAME>`` will be declared with the following properties adjusted:

- ``INTERFACE_LINK_LIBRARIES``: Containing all the component targets to link the global target to (includes package's components only).

.. important::

**Name conflicts**: If the name of the global target is the same for different packages, Conan will aggregate into this global target
all the components from all those different packages. This means that this global target will contain information coming from different
packages. For the components themselves, a name conflict will result in one of them being inaccessible without further notice.
6 changes: 6 additions & 0 deletions reference/generators/cmake_find_package_multi.rst
Expand Up @@ -97,3 +97,9 @@ If a recipe uses :ref:`components <package_information_components>`, the targets
Moreover, a global target ``<PKG-NAME>::<PKG-NAME>`` will be declared with the following properties adjusted:

- ``INTERFACE_LINK_LIBRARIES``: Containing the list of targets for all the components in the package.

.. important::

**Name conflicts**: If the name of the global target is the same for different packages, Conan will aggregate into this global target
all the components from all those different packages. This means that this global target will contain information coming from different
packages. For the components themselves, a name conflict will result in one of them being inaccessible without further notice.