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 GLOBAL to conan targets so they can be used with ALIAS in CMake #6438

Merged
merged 4 commits into from Jan 30, 2020

Conversation

czoido
Copy link
Contributor

@czoido czoido commented Jan 29, 2020

Changelog: Feature: Set conan generated CMake targets as GLOBAL so that they can be used with an ALIAS for consumers.
Docs: conan-io/docs#1534

Making an ALIAS of an IMPORTED target is possible in CMake for versions >v3.10.3 (>v3.14 in case they are UNKNOWN too) but they have to be set as GLOBAL.
This PR sets those targets defined by Conan as GLOBAL so they can take advantage of this for consumers with modern CMake versions.

fixes: #3482

#tags: slow

  • Refer to the issue that supports this Pull Request.
  • If the issue has missing info, explain the purpose/use case/pain/need that covers this Pull Request.
  • I've read the Contributing guide.
  • I've followed the PEP8 style guides for Python code.
  • I've opened another PR in the Conan docs repo to the develop branch, documenting this one.

Note: By default this PR will skip the slower tests and will use a limited set of python versions. Check here how to increase the testing level by writing some tags in the current PR body text.

@czoido czoido changed the title Add GLOBAL to LIB targets so they can be used with ALIAS in CMake Add GLOBAL to conan targets so they can be used with ALIAS in CMake Jan 29, 2020
@memsharded memsharded added this to the 1.22 milestone Jan 29, 2020
Copy link
Member

@memsharded memsharded left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a couple of lines to the docs, update the link and merge.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[generator][CMake]: CONAN_LIB::* targets should be defined as GLOBAL
2 participants