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
[feature] [toolchain.cmake] Set platform and toolset only if generator matches Visual Studio #7485
Comments
Related to #5737 |
It seems that this will not be resolved until build-time, when cmake is actually called. |
The issue is that we should consider how to integrate toolchains with IDEs first and foremost, it's crucial if we want gain popularity with a wider user base. |
Possibly the biggest goal of toolchain() is to provide a better integration with build systems and IDEs. Being the core concept of toolchains that they generate files that can be used by the build systems, instead of calling the build systems and passing a lot of stuff via command line and environment, I would say that toolchains should definitely help in a better integration with the IDEs too. The plan for next release is to do some more steps and provide preliminary support for MSBuild, Autotools and Meson toolchains, and hopefully more feedback starts to come. |
I am having a look and trying to add testing that includes the Ninja build system: https://github.com/memsharded/conan/tree/feature/toolchain_cmake_ninja There are important design issues here, which require new solutions. Nothing that can be done right now, will keep working in next 1.31. |
Hi @memsharded !
What do you mean when say "will not be resolved"? The Why not merge this solution in the next release? :) Edit: to be precise, I think we should implement the same logic like in |
It seems that #8333 is not really necesary. This was fix earlier, and the toolchain is checking that the generator is "Visual" one, otherwise it will not add platform and toolset variables. |
It was possibly fixed in #8192, that is also part of 1.33. |
Use case: Using MSVC with Ninja as CMake Generator. It doesn't support
PLATFORM
andTOOLSET
variables and errors out on them.Consider generating the template like this:
The text was updated successfully, but these errors were encountered: