summaryrefslogtreecommitdiff
path: root/contrib/buildsystems/CMakeLists.txt
diff options
context:
space:
mode:
authorJohannes Schindelin <johannes.schindelin@gmx.de>2020-09-30 15:26:23 (GMT)
committerJunio C Hamano <gitster@pobox.com>2020-09-30 20:26:54 (GMT)
commitf2f1250c47fd967b7678cad329438e8deac62038 (patch)
tree00bb50156cf95e33e5fbfc2fa7f08d804f216f7e /contrib/buildsystems/CMakeLists.txt
parentb490283d5200952b87f49ac43457da7a332b4598 (diff)
downloadgit-f2f1250c47fd967b7678cad329438e8deac62038.zip
git-f2f1250c47fd967b7678cad329438e8deac62038.tar.gz
git-f2f1250c47fd967b7678cad329438e8deac62038.tar.bz2
cmake (Windows): recommend using Visual Studio's built-in CMake support
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). While at it, recommend using `contrib/buildsystems/out/` as build directory also in the part that talks about running CMake manually. Helped-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'contrib/buildsystems/CMakeLists.txt')
-rw-r--r--contrib/buildsystems/CMakeLists.txt26
1 files changed, 17 insertions, 9 deletions
diff --git a/contrib/buildsystems/CMakeLists.txt b/contrib/buildsystems/CMakeLists.txt
index ebadae2..df539a4 100644
--- a/contrib/buildsystems/CMakeLists.txt
+++ b/contrib/buildsystems/CMakeLists.txt
@@ -4,17 +4,25 @@
#[[
-Instructions to run CMake:
+Instructions how to use this in Visual Studio:
-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
+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.
-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
+Note: Visual Studio also has the option of opening `CMakeLists.txt`
+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:
+
+ 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