-
Notifications
You must be signed in to change notification settings - Fork 990
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
[question] Handling redundant settings due to cmaketoolchain:user_toolchain
#15582
Comments
Hi @sykhro Thanks for your detailed report. This is a known issue, I think it is the same as #13920. I have been trying to address it for a while, but so far we haven't got enough time to do it, even if I started the effort and I have something in a branch. I'll try to give it another push, thanks for raising the isue! |
Yes, it's indeed the same issue, I had trouble wording it. I'd be happy to contribute if you have any pointers |
Thanks for checking. I think we can close this ticket and follow up on the other one. |
To be more precise, the root cause is the same but it would probably still be nice to be able to toggle which CMakeToolchain blocks to enable/disable from the profile itself, so that the repetition of variables can be avoided completely |
I am submitting #15654 to fix this, hopefully for next 2.1, feedback welcome! (the PR might close this ticket when merged) The feature to enable/disable individual blocks is a bit more unlikely, it would need a separate, dedicated issue to discuss it. |
Merged #15654 for next 2.1 |
What is your question?
I have a profile for Release-mode clang-cl:
the profile uses a CMake user toolchain and also specifies C(XX)FLAGS for projects that use other build systems:
This, however, causes build failures with CMake.
The user toolchain file sets the link flags as follows:
while conan generates the following code for
conan_toolchain.cmake
:but during the compiler checks, CMake defaults to
Debug
mode (I'm using a multi-config generator).So, the linker line becomes a mix of Debug and Release flags.
My question is: how can I disable the CMakeToolchain
cmake_flags_init
block directly from the profile?Have you read the CONTRIBUTING guide?
The text was updated successfully, but these errors were encountered: