File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -117,7 +117,7 @@ if "%VisualStudioVersion%" == "18.0" (
117117 set CMAKEOPT = -A x64 -T v142
118118 set MSVSVER = 2019
119119) else (
120- echo Use Visual Studio 2022 or 2019
120+ echo Use Visual Studio 2026, 2022 or 2019
121121 pause
122122 exit /b 1
123123)
@@ -182,12 +182,12 @@ set CMAKECMD=cmake %CMAKEOPT% -S . -DCMAKE_BUILD_TYPE=Release -DENABLE_STATIC=ON
182182echo %CMAKECMD%
183183%CMAKECMD% > nul 2 >& 1
184184
185- set DEVENVCMD = devenv mongo-c-driver.sln /project mongoc_static /rebuild Release
186- echo %DEVENVCMD %
187- %DEVENVCMD % > nul 2 >& 1
185+ set BUILDCMD = cmake --build . --config Release --target mongoc_static --clean-first
186+ echo %BUILDCMD %
187+ %BUILDCMD % > nul 2 >& 1
188188if ERRORLEVEL 1 (
189189 :: Shows error
190- %DEVENVCMD %
190+ %BUILDCMD %
191191 echo;
192192 echo Build failed.
193193 echo MongoDB driver not available.
@@ -202,7 +202,10 @@ rd /s /q lz4 >nul 2>&1
202202del /f /q lz4 > nul 2 >& 1
203203mklink /j lz4 lz4-%LZ4_VERSION% > nul 2 >& 1
204204rmdir /s /q lz4\build\cmake\build > nul 2 >& 1
205- cmake %CMAKEOPT% -S lz4\build\cmake -B lz4\build\cmake\build -DBUILD_STATIC_LIBS=ON
205+ set CMAKECMD = cmake %CMAKEOPT% -S lz4\build\cmake -B lz4\build\cmake\build -DBUILD_STATIC_LIBS=ON
206+ echo %CMAKECMD%
207+ %CMAKECMD% > nul 2 >& 1
208+
206209set BUILDCMD = cmake --build lz4\build\cmake\build --config Release --clean-first -j
207210echo %BUILDCMD%
208211%BUILDCMD% > nul 2 >& 1
@@ -227,12 +230,13 @@ rmdir /s /q build >nul 2>&1
227230set CMAKECMD = cmake -S . -B build %CMAKEOPT% -DBUILD_SHARED_LIBS=OFF
228231echo %CMAKECMD%
229232%CMAKECMD%
230- set CMAKECMD = cmake --build build -j
231- echo %CMAKECMD%
232- %CMAKECMD% > nul 2 >& 1
233+
234+ set BUILDCMD = cmake --build build -j
235+ echo %BUILDCMD%
236+ %BUILDCMD% > nul 2 >& 1
233237if ERRORLEVEL 1 (
234238 :: Shows error
235- %CMAKECMD %
239+ %BUILDCMD %
236240 echo;
237241 echo Build failed.
238242 echo glog not available.
You can’t perform that action at this time.
0 commit comments