CMake preset and VsDevCmd.bat / yocto environment

There is the environment element in CMakePresets.json to specify environment variables.

However, the usual way to get the build tools into PATH and other variables is to run a script before executing cmake.

Can this be done via presets? Or do I still need to to this manually before?

I don’t think presets changed that behavior. @kyle.edwards?

No, there are currently no plans to make CMakePresets.json read from or interact with vcvarsall.bat. At most, in the future we may add functionality to verify that vcvarsall.bat has been run correctly, but not actually run it from CMake.

Ok :sob:, but I understand why this is not in the core interest of CMake.
We really could have used this feature, since we have multiple targets with different build environments.