presets: Confusion around binaryDir in CMakePresets.json
First let me say I think the CMakePresets functionality is awesome but I did have a huge confusion when I first stated trying to use it.
Note I am no expert so may be completely misunderstanding the current behavior and the following may be garbage!
Historically using CMake I get a source tree from somewhere and put it in some directory like src.
I then create a build directory at the same level as src go into that directory and run cmake like
cmake -G "blah" -D... -T... ../src
So I am running cmake in the build directory with lots of arguments and then pointing at the source directory, in this case using a relative path '../src'.
In the CMakePresets world it seems that you have to specify a "binaryDir" and that when you run cmake the generated stuff will go into this binary directory. So if I specify '"binaryDir": "foo"' the generated file will go into a sub directory of the src directory called foo.
This seems to invert the previous behavior where you could run cmake wherever you liked and point to wherever the source tree is. I found it very confusing that when I went into my build directory and ran cmake nothing appeared in there.
I'm not sure why it works this way I'm assuming there are reasons but I think it is a big change and should be prominently documented in the introduction of the cmake. I personally really don't like the idea of hard coding where build tree will go. My suggestion would be that if binaryDir is not specified that cmake should default to the current working directory where CMake is being run