-
Notifications
You must be signed in to change notification settings - Fork 989
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
Conversation
This slightly changes behavior. To a better one, something that makes more sense, for sure. To discuss if the previous behavior was buggy. |
conans/client/tools/files.py
Outdated
if not os.path.exists(lib_folder): | ||
conanfile.output.warn("Lib folder doesn't exist, can't collect libraries: " | ||
"{0}".format(lib_folder)) | ||
return [] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
conans/client/tools/files.py
Outdated
if not os.path.exists(lib_folder): | ||
conanfile.output.warn("Lib folder doesn't exist, can't collect libraries: " | ||
"{0}".format(lib_folder)) | ||
return [] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
…io#3503) * Use self.cpp_info.libdirs as folders for tools.collect_libs() * warn and continue with test
develop
branch, documenting this one. Also adding a description of the changes in thechangelog.rst
file. https://github.com/conan-io/docsChangelog: Feature: The tool
tools.collect_libs()
now search into each folder declared inself.cpp_info.libdirs
.