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

let CMakeToolchain not crash if build_type not defined #9984

Merged

Conversation

memsharded
Copy link
Member

@memsharded memsharded commented Nov 8, 2021

Changelog: Fix: CMakeToolchain will not crash if build_type not defined.
Docs: Omit

@KerstinKeller

@memsharded memsharded added this to the 1.43 milestone Nov 8, 2021
@lasote lasote marked this pull request as ready for review November 10, 2021 06:54
Copy link
Contributor

@lasote lasote left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing a bit of context, there is an issue we can link? I assume there is something to discuss (look into label).

@memsharded
Copy link
Member Author

Missing a bit of context, there is an issue we can link? I assume there is something to discuss (look into label).

Yes, this came from slack conversation with user (and Tribe member):

  • They have multi-config packages, containing both Debug and Release
  • They don't use CMakeDeps, because they use cmake_paths to get the config.cmake files from inside the packages
  • The new CMakeToolchain was raising errors if they don't define the build_type setting.

Even if the tribe proposal said that cpp_info.configs is being removed and the plan is that users should migrate to single-config packages, there still will be some users in this situation. It seems that this PR can help them, but probably we want to carefully consider the implications.

@KerstinKeller
Copy link

The problem can also be fixed by removing the vs_runtime block for generation

tc.blocks.remove("vs_runtime")

For my usecase it is good enough, so I guess, for us, strictly speaking the PR is not neccessary.

@memsharded memsharded merged commit 14d01da into conan-io:develop Nov 30, 2021
@memsharded memsharded deleted the fix/cmaketoolchain_without_build_type branch November 30, 2021 10:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants