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

Different cpp info name by generator #6033

Merged
merged 19 commits into from Dec 5, 2019

Conversation

@ledocc
Copy link
Contributor

ledocc commented Nov 6, 2019

Changelog: Feature: Allow setting different cpp_info name for each generator that supports that property using the new cpp_info.names["generator_name"] property.
Docs: conan-io/docs#1489

Currently, only one cpp_info.name can be specified for all the generators that support this property. This PR allows using a different name depending on the generator that is used using the new names["generator_name"] property. If the generator is not set for a generator it will use the cpp_info.name by default. Supported by cmake, cmake_multi, cmake_paths, cmake_find_package, cmake_find_package_multi and pkg_config generators.

Closes #5993

  • 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.

@CLAassistant

This comment has been minimized.

Copy link

CLAassistant commented Nov 6, 2019

CLA assistant check
All committers have signed the CLA.

@ledocc ledocc changed the title WIP Different cpp info name by generator WIP: Different cpp info name by generator Nov 6, 2019
@lasote lasote added this to the 1.21 milestone Nov 19, 2019
Copy link
Contributor

lasote left a comment

Hi @ledocc thanks for this attempt. It was very useful to realize that the interface we proposed it would be very problematic trying to read a str value from a "cpp_info.name".
We want to propose a simplification, cpp.name as it was, and introduce a cpp.names that will be a dictionary always. The generators need to check first if entry in names, then name.
Let me know ASAP if you can still work on this or we can take over it.
Thanks again

@ledocc

This comment has been minimized.

Copy link
Contributor Author

ledocc commented Nov 19, 2019

hi @lasote, introduce a cpp.names made code cleaner, good news.
I will do that this week and the next one.

@ledocc ledocc force-pushed the ledocc:different_cpp_info_name_by_generator branch 3 times, most recently from 5f7746c to 3535df2 Nov 26, 2019
@ledocc ledocc changed the title WIP: Different cpp info name by generator Different cpp info name by generator Dec 3, 2019
@ledocc ledocc force-pushed the ledocc:different_cpp_info_name_by_generator branch from 3535df2 to 2d88f7e Dec 3, 2019
@ledocc ledocc force-pushed the ledocc:different_cpp_info_name_by_generator branch from 2d88f7e to be9d87e Dec 3, 2019
@ledocc

This comment has been minimized.

Copy link
Contributor Author

ledocc commented Dec 3, 2019

Hi @lasote, ready to review

@czoido

This comment has been minimized.

Copy link
Contributor

czoido commented Dec 3, 2019

Hi @ledocc,
Thanks a lot for the contribution, I'll start testing and reviewing it.

@czoido czoido self-assigned this Dec 3, 2019
@czoido

This comment has been minimized.

Copy link
Contributor

czoido commented Dec 3, 2019

Hi @ledocc,
Don't worry about the documentation, I'll do it and modify the changelog as well.

conans/client/generators/pkg_config.py Show resolved Hide resolved
conans/client/generators/pkg_config.py Outdated Show resolved Hide resolved
conans/client/generators/cmake_multi.py Outdated Show resolved Hide resolved
conans/client/generators/cmake_paths.py Outdated Show resolved Hide resolved
conans/client/generators/cmake_find_package_multi.py Outdated Show resolved Hide resolved
conans/client/generators/cmake_find_package_multi.py Outdated Show resolved Hide resolved
conans/client/generators/cmake_find_package.py Outdated Show resolved Hide resolved
conans/test/unittests/client/generators/cmake_test.py Outdated Show resolved Hide resolved
conans/client/generators/pkg_config.py Outdated Show resolved Hide resolved
@ledocc

This comment has been minimized.

Copy link
Contributor Author

ledocc commented Dec 4, 2019

Hi @ledocc,
Don't worry about the documentation, I'll do it and modify the changelog as well.

thanks

@ledocc ledocc force-pushed the ledocc:different_cpp_info_name_by_generator branch from be9d87e to 50a0cca Dec 4, 2019
@czoido

This comment has been minimized.

Copy link
Contributor

czoido commented Dec 4, 2019

Hi @ledocc, we are in a little hurry to release this feature.
Would you mind if I push the changes to your branch to finish the feature?

…occ/conan into different_cpp_info_name_by_generator
@ledocc

This comment has been minimized.

Copy link
Contributor Author

ledocc commented Dec 4, 2019

no problem

@czoido

This comment has been minimized.

Copy link
Contributor

czoido commented Dec 4, 2019

no problem

Thanks a lot!

czoido added 9 commits Dec 4, 2019
Copy link
Contributor

lasote left a comment

Looks nice

conans/client/generators/cmake_find_package.py Outdated Show resolved Hide resolved
conans/client/generators/pkg_config.py Show resolved Hide resolved
@lasote lasote assigned memsharded and unassigned czoido Dec 4, 2019
@lasote lasote requested a review from memsharded Dec 4, 2019
czoido added 2 commits Dec 4, 2019
@lasote
lasote approved these changes Dec 5, 2019
conans/model/build_info.py Outdated Show resolved Hide resolved
@czoido
czoido approved these changes Dec 5, 2019
Copy link
Member

memsharded left a comment

Looks good, good job!

@lasote lasote merged commit d1c398b into conan-io:develop Dec 5, 2019
2 checks passed
2 checks passed
continuous-integration/jenkins/pr-head This commit looks good
Details
license/cla Contributor License Agreement is signed.
Details
@lasote

This comment has been minimized.

Copy link
Contributor

lasote commented Dec 5, 2019

Merged without squashing commits so we keep the contribution from @ledocc
Thanks!!

@SSE4 SSE4 mentioned this pull request Dec 9, 2019
3 of 4 tasks complete
ericLemanissier added a commit to ericLemanissier/conan that referenced this pull request Dec 11, 2019
fixes up conan-io#5988 now that conan-io#6033 is merged
@ericLemanissier ericLemanissier mentioned this pull request Dec 11, 2019
3 of 5 tasks complete
ericLemanissier added a commit to ericLemanissier/conan that referenced this pull request Dec 11, 2019
Croydon referenced this pull request in conan-io/conan-center-index Dec 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants
You can’t perform that action at this time.