forked from mindspore-Ecosystem/mindspore
fix bat bug
This commit is contained in:
parent
0d035c4008
commit
b9795a9222
24
build.bat
24
build.bat
|
@ -38,9 +38,6 @@ del version.txt
|
||||||
|
|
||||||
echo "======Start building MindSpore Lite %VERSION_MAJOR%.%VERSION_MINOR%.%VERSION_REVISION%======"
|
echo "======Start building MindSpore Lite %VERSION_MAJOR%.%VERSION_MINOR%.%VERSION_REVISION%======"
|
||||||
|
|
||||||
SET threads=6
|
|
||||||
SET X86_64_SIMD=off
|
|
||||||
|
|
||||||
ECHO %2%|FINDSTR "^[0-9][0-9]*$"
|
ECHO %2%|FINDSTR "^[0-9][0-9]*$"
|
||||||
IF %errorlevel% == 0 (
|
IF %errorlevel% == 0 (
|
||||||
SET threads=%2%
|
SET threads=%2%
|
||||||
|
@ -57,6 +54,7 @@ IF %errorlevel% == 0 (
|
||||||
) ELSE (
|
) ELSE (
|
||||||
echo "MindSpore_lite the second parameter must in [avx, avx512, sse, off], but now is [%2%]"
|
echo "MindSpore_lite the second parameter must in [avx, avx512, sse, off], but now is [%2%]"
|
||||||
call :clean
|
call :clean
|
||||||
|
EXIT /b 1
|
||||||
)
|
)
|
||||||
IF NOT "%3%" == "" (
|
IF NOT "%3%" == "" (
|
||||||
SET threads=%3%
|
SET threads=%3%
|
||||||
|
@ -87,24 +85,22 @@ IF "%1%" == "lite" (
|
||||||
IF NOT %errorlevel% == 0 (
|
IF NOT %errorlevel% == 0 (
|
||||||
echo "cmake fail."
|
echo "cmake fail."
|
||||||
call :clean
|
call :clean
|
||||||
|
EXIT /b 1
|
||||||
)
|
)
|
||||||
|
|
||||||
cmake --build . --target package -- -j%threads%
|
cmake --build . --target package -- -j%threads%
|
||||||
IF NOT %errorlevel% == 0 (
|
IF NOT %errorlevel% == 0 (
|
||||||
echo "build fail."
|
echo "build fail."
|
||||||
call :clean
|
call :clean
|
||||||
|
EXIT /b 1
|
||||||
)
|
)
|
||||||
|
|
||||||
IF EXIST "%BASE_PATH%/output" (
|
call :clean
|
||||||
cd %BASE_PATH%/output
|
EXIT /b 0
|
||||||
rd /s /q _CPack_Packages
|
|
||||||
)
|
|
||||||
|
|
||||||
cd %BASE_PATH%
|
|
||||||
set errorlevel=0
|
|
||||||
EXIT /b %errorlevel%
|
|
||||||
|
|
||||||
:clean
|
:clean
|
||||||
cd %BASE_PATH%
|
IF EXIST "%BASE_PATH%/output" (
|
||||||
set errorlevel=1
|
cd %BASE_PATH%/output
|
||||||
EXIT /b %errorlevel%
|
rd /s /q _CPack_Packages
|
||||||
|
)
|
||||||
|
cd %BASE_PATH%
|
Loading…
Reference in New Issue