The user setting the -B parameter on the command line is exactly why I would like to have it in as a macro expansion in the preset. I would like the preset to “fill in the blanks” after the user sets where he wants the build to go. In my case to set the CMAKE_PREFIX_PATH to somewhere I know the dependency provider will generate config files. And the deps provider is also set via this top-level include var in the preset. So the CMakeLists doesn’t know so I can’t/don’t want to put the prefix in there. But maybe my hopes were too high. So you are telling me that my only hope is to basically set the build dir also via the preset, preferably to something like ${sourceParentDir}/build?
This was how I wanted to use it so from my point of view the build dir could be known in time the preset is loaded.
cmake -S .\code\ -B .\build\ --preset current
I haven’t looked much into the workflows. I’m just doing baby steps with presets now ![]()
Thanks very much for the answers