From a2cdf8e5d646d6606f2436d79b9de4ebedb8cade Mon Sep 17 00:00:00 2001 From: lyvette Date: Tue, 22 Sep 2020 12:25:56 +0800 Subject: [PATCH] modify version for windows build --- build.bat | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/build.bat b/build.bat index b8568966aa..72c14fb020 100644 --- a/build.bat +++ b/build.bat @@ -83,10 +83,15 @@ cd %BASEPATH% goto run_eof :run_cmake + cd %BASEPATH% + for /F %%i in ('find "const int ms_version_major =" mindspore\lite\include\version.h ^| tr -dc "[0-9]"') do ( set VERSION_MAJOR=%%i) + for /F %%i in ('find "const int ms_version_minor =" mindspore\lite\include\version.h ^| tr -dc "[0-9]"') do ( set VERSION_MINOR=%%i) + for /F %%i in ('find "const int ms_version_revision =" mindspore\lite\include\version.h ^| tr -dc "[0-9]"') do ( set VERSION_REVISION=%%i) + echo "======Start building MindSpore Lite %VERSION_MAJOR%.%VERSION_MINOR%.%VERSION_REVISION%======" cd %BUILD_PATH%/mindspore cmake -DBUILD_DEVICE=on -DBUILD_CONVERTER=on -DPLATFORM_ARM64=off -DSUPPORT_TRAIN=off ^ -DCMAKE_BUILD_TYPE=Release -DSUPPORT_GPU=off -DBUILD_MINDDATA=off -DOFFLINE_COMPILE=off ^ - -DMS_VERSION_MAJOR=0 -DMS_VERSION_MINOR=7 -DMS_VERSION_REVISION=0 ^ + -DMS_VERSION_MAJOR=%VERSION_MAJOR% -DMS_VERSION_MINOR=%VERSION_MINOR% -DMS_VERSION_REVISION=%VERSION_REVISION% ^ -G "CodeBlocks - MinGW Makefiles" "%BASEPATH%/mindspore/lite" GOTO:EOF