1#!/bin/bash
2# Copyright (c) 2023 Huawei Device Co., Ltd.
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7#     http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15set -e
16cd $(dirname $0)/../
17
18export TOOLCHAIN_PATH=../../../../../vendor/hisi/npu/bin/misc/native/
19
20rm -rf build/
21mkdir build && cd build
22
23${TOOLCHAIN_PATH}/build-tools/cmake/bin/cmake .. \
24    -DOHOS_STL=c++_static \
25    -DCMAKE_TOOLCHAIN_FILE=../../../../../vendor/hisi/npu/build/core/cmake/toolchain/ohos-ndk.toolchain.cmake \
26	-DFFRT_EXAMPLE=ON \
27	-DFFRT_BENCHMARKS=ON \
28	-DFFRT_TEST_ENABLE=ON \
29	-DFFRT_ST_ENABLE=ON \
30	-DFFRT_HLT_ENABLE=ON \
31	-DFFRT_PERF_EVENT_ENABLE=ON \
32
33make -j ffrt
34make -j ffrt_st
35make -j