Hi Junio, On Wed, 23 Sep 2020, Junio C Hamano wrote: > Johannes Schindelin <Johannes.Schindelin@xxxxxx> writes: > > >> > The change that Dscho suggested was meant for those people that run > >> > CMake in same directory of source dir, which is mostly discouraged > >> > in CMake land. > > > > It is discouraged, but not disallowed. > > ... > >> > I think the original CMake proposal didn't touch .gitignore because > >> > they run in a separated build-dir. > >> > >> If so, not only my "do we need a matching change to CMakeLists to > >> teach how to clean crufts?" becomes unnecessary, but the original > >> patch that started this thread to touch .gitignore at the top level, > >> does, too. > >> > >> I wonder what led Dscho not to follow the "create a 'build' dir and > >> do things there" practice. Judging from the fact that the "because > >> they run in a separate build directory" assumption did not hold to > >> somebody as experienced as Dscho, it is likely others would do the > >> same. > > > > That's because Dscho does not like the separate build directory, even if > > they know that in the CMake world, it is kind of expected. > > Sorry, but that does not sound like a convincing excuse because ... > > > It's just that it would be super convenient for Visual Studio users to > > just generate their project files in-place. That's why I started down that > > road. > > ... > > Ideally, we would tell Visual Studio users to "just install CMake, start > > its GUI, direct it to the Git source, configure and generate". Alas, it is > > not that easy: > > > > - The `SH_EXE` is not found by default (`C:\Program Files\Git\bin\sh.exe` > > should be used in the vast majority of the cases), > > - If the build directory is left unspecified, the non-writable `C:\Program > > Files\CMake\bin` directory is used, > > - The `compat\vcbuild\vcpkg` system is not initialized automatically, and > > even if the user initialized it, the dependencies (such as expat, zlib) > > are still not found. > > ... if the build directory needs to be specified anyway, there don't It doesn't need to be specified. > seem to be a big difference between telling them to create an empty > build place and use it and telling them to point at the source tree > itself, so ... > > > I would like to make things easier, and forcing users to use a separate > > build directory (that needs to be outside of the Git source tree because > > our `.gitignore` does not handle it well) would go the other direction, I > > fear. > > ... the above sounds like the argument concentrates too much on > where the build directory is (i.e. between "in place" and "a > throw-away directory next door"), which sounds like much smaller > point compared to the other things that needs to be improved in the > VS users. And making a choice against what is recommended as best > practice...? I dunno. All I want is for the CMake support to be easier to use, yet we go in the opposite direction: instead of allowing to use CMake under more circumstances (which actually *works*, we just don't have the appropriate patterns in our `.gitignore` yet to avoid adding and committing the generated files), we now seem to intend to require a separate build directory. That's the opposite direction of making things more convenient for Visual Studio users. Ciao, Dscho