Skip to content
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] CMakeDeps generated files for release packages don't work for debug builds on Linux #17749

Open
glennaycock opened this issue Feb 10, 2025 · 1 comment
Assignees

Comments

@glennaycock
Copy link

Describe the bug

We are in the process of migrating our build to Conan 2.

Previously, our Linux build used release packages for both debug/release builds using the old CMake generators. We used a combination of CONFIG and MODULE for find_package() with various packages. This worked fine for our purposes.

Based on the documentation recommendations, we are now using find_package() in CONFIG mode. However, the new generators produce files that only include target properties for matching build types due to checks for $CONFIG:Release.

This is a major breakage for us, as we don't want to use/maintain debug packages.

Is there a workaround for this?

How to reproduce it

No response

@memsharded
Copy link
Member

Hi @glennaycock

Thanks for your feedback.

It is not very clear what is the issue. It is possible to consumer Release packages in Debug builds with CMakeDeps.
The approach is like:

conan install ... -s build_type=Release -s "&:build_type=Debug"

To indicate that the dependencies are release but the current consumer "&=consumer" is debug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants