-
Notifications
You must be signed in to change notification settings - Fork 959
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
[bug] Cannot override version of build requirement #11512
Comments
Yes, A couple of important things:
|
Which then leads to the question of how you can have a recipe that requires libraries for building it, but that are private to this recipe and consumers of said recipe do not have those requirements. Unless of course they want to use them, at which point they need to require them on its own. If I am building a library that requires header only libraries for example then the consumers of said recipe don't need to have those. |
Those issues have been addressed for Conan 2.0: |
The currently desired use case was talked about in the video you linked. Have a recipe that requires stuff, builds a fully linked native thing and thus any consumer does not have any of the dependencies of said recipe. |
It is possible in Conan 1.X under some situations. For example, linkers are typically smart enough to discard unused things, so propagating a static library down to the consumer via shared intermediate one, might be fully discarded, no effect. If that is not the case, it is also possible to use some build system-fu, like CMake stripping unwanted libraries, but yes, I know that can be tricky. |
Well in this case it's more a thing of the stuff still being downloaded and (potentially) built (despite being completely unnecessary), which the goal was to avoid that |
So just to clarify: So it appears to me that the following are the only options right now:
|
I think it is important to highlight that the recipes themselves can be fully compatible both in Conan 1.X and Conan 2.0. We will do the same for ConanCenter, recipes will build simultaneously binaries for 1.X and 2.0. Users using 1.X will still get their binaries for 1.X and users using 2.0 will get the binaries built with 2.0. With exactly the same common recipe. |
Closing this as solved in 2.0 (to be released very soon) |
Environment Details (include every applicable attribute)
Steps to reproduce (Include if Applicable)
Logs (Executed commands with output) (Include/Attach if Applicable)
The text was updated successfully, but these errors were encountered: