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 build_modules to cpp_info and manage CMake modules #5940
Conversation
else: | ||
return abs_paths | ||
|
||
@property | ||
def build_modules_paths(self): |
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.
The property is needed in order to convert the relative paths to absolute
Worked on a real example using the The "cannonical" way of using this library is described here: https://pybind11.readthedocs.io/en/stable/compiling.html#building-with-cmake |
Added docs |
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 am not sure this fulfills the specification we had in mind, with 2 different fields:
- cpp_info.build_modules: will inject and load those files (can assume they exists)
- cpp_info.build_modules_paths: will add those paths to the build system search path
The later was necessary for functionality that users don't want to auto-load, but want to explicitly include()
in their CMakeLists.txt. I think it is not necessary to filter empty directories in the build_modules_paths. This one can also be used to define paths in case the automatically injected ones transitively include other .cmake scripts in the package.
Changes done! |
Changelog: Feature: Add
cpp_info.build_modules
to manage build system modules like additional CMake functions in packagesDocs: conan-io/docs#1465
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.