-
Hi, I've been wondering if it's possible to configure the Take the example below:
In my example, you can see the first option is 4 different build profiles, I switch between them, and it tells CMake which toolchain and optimisation to use etc. Now, the issue is, I want the Is this possible? Or am I thinking about it completely wrong and need to approach it differently? I really like the idea of variants as it allows me to easily flick between different build configurations. But in this particular situation, I need it to not quite be a full matrix combination. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
Unfortunately, there is not a way to set up rules for custom combinations when using variants. If you'd like to have more control over this. you'd have to switch to using It's on our backlog to come up with a proposal to Kitware that will allow for easier combinatorics with CMake presets. (e.g. address this: https://gitlab.kitware.com/cmake/cmake/-/issues/22538) |
Beta Was this translation helpful? Give feedback.
-
Ah thanks, sure. For now I've just manually made the combinatorics so that it's exactly how I want. It's not scalable but works for now since I don't have a large amount of combinations. I'll probably as a workaround make a simple script to generate a |
Beta Was this translation helpful? Give feedback.
Unfortunately, there is not a way to set up rules for custom combinations when using variants. If you'd like to have more control over this. you'd have to switch to using
CMakePresets.json
. Though CMake presets don't let you specify rules either, you can define presets that consist of a combination of other partial presets such that you could get what you want.It's on our backlog to come up with a proposal to Kitware that will allow for easier combinatorics with CMake presets. (e.g. address this: https://gitlab.kitware.com/cmake/cmake/-/issues/22538)