Skip to content

Commit 3a6cc01

Browse files
committed
support Ninja
1 parent c1f3609 commit 3a6cc01

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

paddle/scripts/paddle_build.bat

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ if not defined INFERENCE_DEMO_INSTALL_DIR set INFERENCE_DEMO_INSTALL_DIR=%cache_
7272
if not defined LOG_LEVEL set LOG_LEVEL=normal
7373
if not defined PRECISION_TEST set PRECISION_TEST=OFF
7474
if not defined NIGHTLY_MODE set PRECISION_TEST=OFF
75-
if not defined retry_times set retry_times=2
75+
if not defined retry_times set retry_times=3
7676
if not defined PYTHON_ROOT set PYTHON_ROOT=C:\Python37
7777

7878
rem -------set cache build directory-----------
@@ -193,7 +193,7 @@ rem ------Build windows avx whl package------
193193
set WITH_AVX=ON
194194
set ON_INFER=OFF
195195
set CUDA_ARCH_NAME=All
196-
set retry_times=3
196+
set retry_times=4
197197

198198
call :cmake || goto cmake_error
199199
call :build || goto build_error
@@ -205,7 +205,7 @@ rem ------Build windows no-avx whl package------
205205
set WITH_AVX=OFF
206206
set ON_INFER=OFF
207207
set CUDA_ARCH_NAME=All
208-
set retry_times=3
208+
set retry_times=4
209209

210210
call :cmake || goto cmake_error
211211
call :build || goto build_error
@@ -377,7 +377,11 @@ if NOT %GENERATOR% == "Ninja" (
377377

378378
:build_tp
379379
echo Build third_party the %build_times% time:
380-
MSBuild /m /p:PreferredToolArchitecture=x64 /p:Configuration=Release /verbosity:%LOG_LEVEL% third_party.vcxproj
380+
if %GENERATOR% == "Ninja" (
381+
ninja third_party
382+
) else (
383+
MSBuild /m /p:PreferredToolArchitecture=x64 /p:Configuration=Release /verbosity:%LOG_LEVEL% third_party.vcxproj
384+
)
381385

382386
if %ERRORLEVEL% NEQ 0 (
383387
set /a build_times=%build_times%+1

0 commit comments

Comments
 (0)