I am currently exploring the presets feature. I am trying to make a windows, ninja, clang-cl based build work.
I managed to do it but it only works if I call Visual Studios vcvarsall.bat file first to get the correct environment.
I never liked having to make the extra call to that file though, so I am wondering if there is a way to embedd that call into the CMakePresets.json file or maybe set the environment by hand in that file. So here are my questions:
- Is it possible to specify running a command in the CMakePresets.json file?
- Is there an working example of an CMakePresets.json that sets the same environment as the vcvarsall.bat file?
- Side question… Why is it not necessary to call vsvarsall.bat when using the visual studio generator?