Skip to content

Commit 1c5180c

Browse files
committed
Allow compiling with Visual Studio 2019
1 parent 2453a6d commit 1c5180c

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

build.libgit2.ps1

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,12 @@ try {
124124
cd ..
125125
Run-Command -Quiet { & mkdir build64 }
126126
cd build64
127-
Run-Command -Quiet -Fatal { & $cmake -G "Visual Studio $vs Win64" -D THREADSAFE=ON -D ENABLE_TRACE=ON -D "BUILD_CLAR=$build_clar" -D "LIBGIT2_FILENAME=$binaryFilename" ../.. }
127+
if ($vs -eq "16") {
128+
Run-Command -Quiet -Fatal { & $cmake -G "Visual Studio $vs" -A x64 -D THREADSAFE=ON -D ENABLE_TRACE=ON -D "BUILD_CLAR=$build_clar" -D "LIBGIT2_FILENAME=$binaryFilename" ../.. }
129+
}
130+
else {
131+
Run-Command -Quiet -Fatal { & $cmake -G "Visual Studio $vs Win64" -D THREADSAFE=ON -D ENABLE_TRACE=ON -D "BUILD_CLAR=$build_clar" -D "LIBGIT2_FILENAME=$binaryFilename" ../.. }
132+
}
128133
Run-Command -Quiet -Fatal { & $cmake --build . --config $configuration }
129134
if ($test.IsPresent) { Run-Command -Quiet -Fatal { & $ctest -V . } }
130135
cd $configuration

0 commit comments

Comments
 (0)