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
Adding cpp_info objects model for linking object files #9520
Conversation
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.
One functional test that really links and execute an app with a couple of objects, for this feature please
I'm on it, I already tested the feature with mimalloc: https://github.com/conan-io/conan-center-index/tree/master/recipes/mimalloc |
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.
Pretty cool!
conans/test/functional/toolchains/cmake/cmakedeps/test_cmakedeps.py
Outdated
Show resolved
Hide resolved
project(HelloLib) | ||
file(GLOB HEADERS *.h) | ||
add_library(myobject OBJECT myobject.cpp) | ||
add_library(hello hello.cpp hello.h) |
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.
Why the "hello" library? Is not possible to have a package with just the objects? (I would say it is also an expected use case). I guess everything should work, but with CMake, who knows...
Changelog: Feature: Add objects attribute to the cpp_info so that we can add object files to the linker without having to add those mixed with linker flags.
Docs: conan-io/docs#2243
For the moment it just works with CMakeDeps generator.
It's used like:
Related with:
Related info: