The -C argument script is read in as a CMake script. I think only cache variables “survive” (local variables disappear), but there is support for if and such things. I think if --preset works for you, use it (the cases I’ve run into, a cache script was easier to manage, but I wouldn’t count my usage patterns on this end “normal”[1]).
Thanks for the input. On my project we are already leverage a VS Code CMake Tools extension, which added the ability to have cmake-kits.
It looks like CMakePresets has obsoleted this kit functionality (and the extension supports presets too). In my situation, I just wanted to avoid having to add the CACHE variable I care about to N number of kits. Presets support this because I could’ve inherited from a default preset. However, we don’t have the time to switch over to CMakePresets right now. So I’ll likely keep leveraging our “kits” and use the default cache file for my particular need.