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

Model system_libs in cpp_info/deps_cpp_info and generators #5582

Merged
merged 44 commits into from Oct 29, 2019

Conversation

@danimtb
Copy link
Member

danimtb commented Aug 5, 2019

Changelog: Feature: Add system_deps attribute for cpp_info and deps_cpp_info.
Docs: conan-io/docs#1395

  • Refer to the issue that supports this Pull Request: related to #5090, closes #2382
  • 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.

Copy link
Member

memsharded left a comment

I think this PR is ok, but it needs to be more complete, to actually use that value in the generators. I'd like to see first how this value is going to be used by consumers.

danimtb added 4 commits Aug 8, 2019
@lasote

This comment has been minimized.

Copy link
Contributor

lasote commented Sep 13, 2019

So, this is in the same status @memsharded already commented right?
The cmake generator is creating a variable but not even for cmake the vars are going to be linked.
For other generators the same. These libs need to be used.

@lasote lasote added this to the 1.20 milestone Sep 13, 2019
@danimtb

This comment has been minimized.

Copy link
Member Author

danimtb commented Sep 13, 2019

Sorry that I didn't comment after the change. Yes, the changes were made. Previously system_deps was only added to the cpp_info model. Now a variable in the cmake generator is created and ready to be consumed

@lasote

This comment has been minimized.

Copy link
Contributor

lasote commented Sep 14, 2019

But ready to be used how... Shouldn't we add them to the targets in right order and into the global CONAN_LIBS or am I missing something?

@lasote

This comment has been minimized.

Copy link
Contributor

lasote commented Sep 14, 2019

And same for other generators, In my opinion, we cannot release this if it is not going to work out of the box.

@danimtb

This comment has been minimized.

Copy link
Member Author

danimtb commented Sep 16, 2019

The system_deps libraries are appended to CONAN_LIBS in the cmake generator so it should work in the same way. This PR also includes a cmake variable called CONAN_SYSTEM_DEPS_{dep}{build_type} to differentiate it from the package libs

Copy link
Contributor

lasote left a comment

Missing tests for:

  • CMake target approach
  • CMake find_package approach
  • CMake find_package_multi approach
  • Other generators.
danimtb added 4 commits Oct 15, 2019
@danimtb danimtb changed the title Model system_deps in cpp_info and deps_cpp_info Model system_libs in cpp_info/deps_cpp_info and generators Oct 15, 2019
@memsharded memsharded self-assigned this Oct 22, 2019
Copy link
Member

memsharded left a comment

Please have a look a the comments, specially the one about a changed test and if it could be breaking.

danimtb added 2 commits Oct 28, 2019
@lasote lasote removed their assignment Oct 28, 2019
Copy link
Member

memsharded left a comment

We need to make this backwards compatible, and also consistent with what is done to the global aggregated variables. If CONAN_LIBS is showing package libs + system libs + frameworks, then CONAN_LIBS_MYPKG needs to show the same for MyPkg.

The way to be able to introduce the changes to the package variables is to define new ones as necessary:

  • CONAN_PKG_LIBS_MYPKG: Contains only the package defined ones (MyPkg)
  • CONAN_SYSTEM_LIBS_MYPKG: Contain only the system ones (of MyPkg)
  • CONAN_FRAMEWORKS_MYPKG: Contain the frameworks (of MyPkg)
  • CONAN_LIBS_MYPKG: Contains the addition of all (MyPkg). Final result should remain the same as in the past.
@danimtb

This comment has been minimized.

Copy link
Member Author

danimtb commented Oct 29, 2019

Changes are done as requested in the review. I have not added the frameworks variables to avoid making more noise

conans/client/generators/cmake.py Show resolved Hide resolved
conans/client/generators/cmake.py Outdated Show resolved Hide resolved
@lasote lasote merged commit 9b6028e into conan-io:develop Oct 29, 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.