-
Notifications
You must be signed in to change notification settings - Fork 1k
[bug] Inconsistent build_type with user_presets_path
#18090
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
Comments
Thanks for your feedback. Could you please provide a bit more details to be able to reproduce? Something like:
Thanks! |
Hi @memsharded , I updated the description. |
I see, the problem is:
You are missing the installation of the Debug configuration, the docs in https://docs.conan.io/2/examples/tools/cmake/cmake_toolchain/extend_own_cmake_presets.html instruct to do: $ conan install .
$ conan install . -s build_type=Debug It is necessary to install both Release and Debug, configurations, as the defined user presets depend on both configurations.
Yes, exactly this, this is needed, CMake needs all inherited presets to exist. So this doesn't seem a bug then, but expected behavior. |
I think it would be preferable not to generate CMakeUserPreset.json by default, as generating a conan_toolchain.cmake is sufficient for most scenarios. |
This cannot be changed, it would be breaking behavior to many users that depend on this creation by default. |
@AlexandrePTJ did my above comment clarified the issue? |
Describe the bug
When setting
user_presets_path
as in example, resultingConanPresets.json
file is inconsistent.When
build_type=Debug
, it creates presets withrelease
and vice versa in addition to include expected CMakePreset.Then it cannot build as presets are invalid.
How to reproduce it
Follow instructions from https://docs.conan.io/2/examples/tools/cmake/cmake_toolchain/extend_own_cmake_presets.html
From a fresh debian docker (
docker run --rm -it debian
) :Observation
I run
conan install
with eitherbuild_type=Debug
andbuild_type=Release
. Presets are ok.The text was updated successfully, but these errors were encountered: