• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1@rem Copyright 2021 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_lite_quick_start_c_demo_build
17
18set BASEPATH=%CD%
19
20set ARCH=%1
21set OHOS_TOOLCHAIN_FILE=%2
22
23IF NOT EXIST "%BASEPATH%/build" (
24    md build
25)
26
27set CMAKETOOLCHAINFILE=%OHOS_TOOLCHAIN_FILE%
28
29cd %BASEPATH%/build
30set CMAKEARGS=-G "Kate - Ninja" -DCMAKE_TOOLCHAIN_FILE=%CMAKETOOLCHAINFILE%
31if  %ARCH% == arm32 (
32    set CMAKEARGS=%CMAKEARGS% -DCMAKE_TOOLCHAIN_FILE=%CMAKETOOLCHAINFILE% -DOHOS_ARCH=armeabi-v7a
33) else if %ARCH% == arm64 (
34    set CMAKEARGS=%CMAKEARGS% -DCMAKE_TOOLCHAIN_FILE=%CMAKETOOLCHAINFILE% -DOHOS_ARCH=arm64-v8a
35) else (
36    echo "Error arch, the first input must be 'arm32' or 'arm64' "
37    exit
38)
39cmake %CMAKEARGS% %BASEPATH%
40ninja
41