You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

build.bat 1.5 kB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. @rem Copyright 2020 Huawei Technologies Co., Ltd
  2. @rem
  3. @rem Licensed under the Apache License, Version 2.0 (the "License");
  4. @rem you may not use this file except in compliance with the License.
  5. @rem You may obtain a copy of the License at
  6. @rem
  7. @rem http://www.apache.org/licenses/LICENSE-2.0
  8. @rem
  9. @rem Unless required by applicable law or agreed to in writing, software
  10. @rem distributed under the License is distributed on an "AS IS" BASIS,
  11. @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. @rem See the License for the specific language governing permissions and
  13. @rem limitations under the License.
  14. @rem ============================================================================
  15. @echo off
  16. @title mindspore_build
  17. SET BASEPATH=%CD%
  18. IF NOT EXIST %BASEPATH%/build (
  19. md "build"
  20. )
  21. cd %BASEPATH%/build
  22. SET BUILD_PATH=%CD%
  23. IF NOT EXIST %BUILD_PATH%/mindspore (
  24. md "mindspore"
  25. )
  26. cd %CD%/mindspore
  27. cmake -DCMAKE_BUILD_TYPE=Release -DENABLE_CPU=ON -DENABLE_MINDDATA=ON -DUSE_GLOG=ON -G "CodeBlocks - MinGW Makefiles" ../..
  28. IF NOT %errorlevel% == 0 (
  29. echo "cmake fail."
  30. goto run_fail
  31. )
  32. IF "%1%" == "" (
  33. cmake --build . --target package -- -j6
  34. ) ELSE (
  35. cmake --build . --target package -- -j%1%
  36. )
  37. IF NOT %errorlevel% == 0 (
  38. echo "build fail."
  39. goto run_fail
  40. )
  41. cd %BASEPATH%
  42. goto run_eof
  43. :run_fail
  44. cd %BASEPATH%
  45. set errorlevel=1
  46. :run_eof