Hi Junio, On Fri, 25 Sep 2020, Junio C Hamano wrote: > "Johannes Schindelin via GitGitGadget" <gitgitgadget@xxxxxxxxx> > writes: > > > From: Johannes Schindelin <johannes.schindelin@xxxxxx> > > > > It is a lot more convenient to use than having to specify the > > configuration in CMake manually (does not matter whether using the > > command-line or CMake's GUI). > > > > Signed-off-by: Johannes Schindelin <johannes.schindelin@xxxxxx> > > --- > > contrib/buildsystems/CMakeLists.txt | 12 +++++++++++- > > 1 file changed, 11 insertions(+), 1 deletion(-) > > > > diff --git a/contrib/buildsystems/CMakeLists.txt b/contrib/buildsystems/CMakeLists.txt > > index 1eaeb8b8e0..442b4e69ad 100644 > > --- a/contrib/buildsystems/CMakeLists.txt > > +++ b/contrib/buildsystems/CMakeLists.txt > > @@ -4,7 +4,17 @@ > > > > #[[ > > > > -Instructions to run CMake: > > +Instructions how to use this in Visual Studio: > > + > > +Open the worktree as a folder. Visual Studio 2019 and later will detect > > +the CMake configuration automatically and set everything up for you, > > +ready to build. You can then run the tests in `t/` via a regular Git Bash. > > + > > +Note: Visual Studio also has the option of opening the CMake configuration > > +directly; Using this option, Visual Studio will not find the source code, > > +though, therefore the `File>Open>Folder...` option is preferred. > > + > > +Instructions to run CMake manually: > > > > cmake `relative-path-to-CMakeLists.txt` -DCMAKE_BUILD_TYPE=Release > > Eg. > > Having the primary case upfront is a good idea. As we discussed, > our source tree structure (especially the .gitignore we ship) only > supports an separate-dir build in contrib/buildsystems/out, so we > should update the "manually" part of the instruction to guide users > to use the same location. Perhaps something along the line of the > attached. I squashed your changes into the patch. > Also, after the post-context of the attached patch, there are > mentions of Visual Studio. Please double check if they need > adjustment, or more preferrably the above paragraph the patch in > question added is all that is needed by Visual Studio users, in > which case perhaps it would be a good idea to remove all mention of > Visual Studio there to avoid sending confusing choices to the > readers. The parts that still mention Visual Studio are in the part that talks about running CMake manually, in which case they strike me as helpful, still. Thank you, Dscho > > Thanks. > > contrib/buildsystems/CMakeLists.txt | 16 +++++++--------- > 1 file changed, 7 insertions(+), 9 deletions(-) > > diff --git a/contrib/buildsystems/CMakeLists.txt b/contrib/buildsystems/CMakeLists.txt > index 442b4e69ad..0c748949f9 100644 > --- a/contrib/buildsystems/CMakeLists.txt > +++ b/contrib/buildsystems/CMakeLists.txt > @@ -16,15 +16,13 @@ though, therefore the `File>Open>Folder...` option is preferred. > > Instructions to run CMake manually: > > -cmake `relative-path-to-CMakeLists.txt` -DCMAKE_BUILD_TYPE=Release > -Eg. > -From the root of git source tree > - `cmake contrib/buildsystems/ ` > -This will build the git binaries at the root > - > -For out of source builds, say build in 'git/git-build/' > - `mkdir git-build;cd git-build; cmake ../contrib/buildsystems/` > -This will build the git binaries in git-build directory > + mkdir -p contrib/buildsystems/out > + cd contrib/buildsystems/out > + cmake ../ -DCMAKE_BUILD_TYPE=Release > + > +This will build the git binaries in contrib/buildsystems/out > +directory (our top-level .gitignore file knows to ignore contents of > +this directory). > > Possible build configurations(-DCMAKE_BUILD_TYPE) with corresponding > compiler flags > >