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

Use self.cpp_info.libdirs as folders for tools.collect_libs() #3503

Merged
merged 2 commits into from Sep 25, 2018

Conversation

Projects
None yet
4 participants
@danimtb
Copy link
Member

commented Sep 7, 2018

  • Refer to the issue that supports this Pull Request: closes #3488
  • 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. Also adding a description of the changes in the changelog.rst file. https://github.com/conan-io/docs

Changelog: Feature: The tool tools.collect_libs() now search into each folder declared in self.cpp_info.libdirs.

@ghost ghost assigned danimtb Sep 7, 2018

@ghost ghost added the stage: review label Sep 7, 2018

@danimtb danimtb removed their assignment Sep 7, 2018

@memsharded

This comment has been minimized.

Copy link
Contributor

commented Sep 7, 2018

This slightly changes behavior. To a better one, something that makes more sense, for sure. To discuss if the previous behavior was buggy.

if not os.path.exists(lib_folder):
conanfile.output.warn("Lib folder doesn't exist, can't collect libraries: "
"{0}".format(lib_folder))
return []

This comment has been minimized.

Copy link
@jgsogo

jgsogo Sep 22, 2018

Member

I do not agree with the return here. If we output a warning we should continue with the next folder; otherwise, I would raise a ConanException and force the user to fix it.

This comment has been minimized.

Copy link
@memsharded

memsharded Sep 23, 2018

Contributor

Agree, sounds like a continue instead should make it. Specially because the behavior of conan when no folder exist or is empty for includedirs, libdirs, etc, is ignore them.

Add a test covering this case, please.

if not os.path.exists(lib_folder):
conanfile.output.warn("Lib folder doesn't exist, can't collect libraries: "
"{0}".format(lib_folder))
return []

This comment has been minimized.

Copy link
@memsharded

memsharded Sep 23, 2018

Contributor

Agree, sounds like a continue instead should make it. Specially because the behavior of conan when no folder exist or is empty for includedirs, libdirs, etc, is ignore them.

Add a test covering this case, please.

@ghost ghost assigned danimtb Sep 24, 2018

@jgsogo

jgsogo approved these changes Sep 24, 2018

@danimtb danimtb removed their assignment Sep 24, 2018

@lasote lasote merged commit e0ac828 into conan-io:develop Sep 25, 2018

2 checks passed

continuous-integration/jenkins/pr-head This commit looks good
Details
license/cla Contributor License Agreement is signed.
Details

@ghost ghost removed the stage: review label Sep 25, 2018

grisumbras pushed a commit to grisumbras/conan that referenced this pull request Dec 27, 2018

Use self.cpp_info.libdirs as folders for tools.collect_libs() (conan-…
…io#3503)

* Use self.cpp_info.libdirs as folders for tools.collect_libs()

* warn and continue with test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.