-
Notifications
You must be signed in to change notification settings - Fork 957
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
Is it possible to install two packages with different build types #4785
Comments
It is possible. I am doing exactly this as I have a thrid party lib that contains only profile example...
[settings]
NAME_OF_B:build_type=Release
... commands examples
|
yes you are right @Johnnyxy thanks for the hint. And how do you manage if both packages A and B depend on the same C library. I wanted also that A (debug) links with C (debug) and B (Release) links with C (Release)... how do you manage this? or what is the best way to manage this? |
Generally this is not recommended that you link the same library twice in different flavours. Under really rare circumstances you can do something like that if C-lib is compiled as shared library (.dll, .so) and has a pure C interface with the same function prototypes, macros (if you use any), etc. (API) for Debug and Release, it would be possible if C-Debug and C-Release have different filenames. But this is definitely a bad idea. As this would imply further constraints on A and B. Like C is not allowed to be in the link interface of A and B. ... ... etc ... etc... I strongly advise you against doing something like that. In the history of C/C++ this led to much pain and many hours of bug hunting. Can you elaborate the scenario a little bit more? ... |
Hi @Johnnyxy , i basically put all the dependencies of the package that i require to be built in a specific build type private and i think this acomplish what i want, the only strange thing is that when i also use override with private both =True then in linux the requirements does not happear, is like no requirement exist for the package (in windows all is ok...) Best Regards, |
Hi, @nesc1. There is a problem with the At this moment this is not a big issue, as a normal require will also override upstream dependencies to use the same version, but in the future (v1.14) once merged #4771, it will be necessary in order to declare for a requirement both behaviors: explicit override and dependency (it is an open issue here: #4779). It should behave the same on windows and linux, so I would ask you to double check what you commented and open an issue/bug if it works different for different architectures. Thanks! |
I'm closing this issue, I think the question is more or less exhausted, but feel free to open it again if you want to add something. Thanks! |
Hello, i'm trying to install in my cmake project two conan package dependencies, one (A) that is a normal library and other (B) that is a package that exports binaries.
The first one (A) i want that the build type to be equal to the one specified by the client, and the one that exports binaries (B) I want that build_type is always in Release mode.
How can i acomplish this for my cmake project?
And if these two packages, A and B, both requires another dependency C, can we manage these also?
Thanks
The text was updated successfully, but these errors were encountered: