• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright 2022 Huawei Technologies Co., Ltd
2#
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# ============================================================================
15
16import("//build/ohos.gni")
17
18# Prepare source at first.
19in_zip_path = rebase_path("./mindspore-v2.1.0.zip", root_build_dir)
20out_src_path = rebase_path("./mindspore-src", root_build_dir)
21patch_dir = rebase_path("./patches/", root_build_dir)
22
23args = []
24args += [
25  "--in_zip_path",
26  in_zip_path,
27]
28args += [
29  "--out_src_path",
30  out_src_path,
31]
32args += [
33  "--patch_dir",
34  patch_dir,
35]
36print(args)
37
38exec_script("build_helper.py", args)
39print("Done prepare mindspore source.")
40
41# Define targets
42ohos_group("mindspore-all") {
43  deps = [ "mindspore-src/source/mindspore/lite/:mindspore" ]
44}
45
46group("mindir") {
47  public_deps = [ "mindspore-src/source/mindspore/lite/mindir:mindir_lib" ]
48}
49
50ohos_group("mindspore-ndk") {
51  deps = [ "mindspore-src/source/mindspore/lite/:mindspore_ndk" ]
52}
53
54ohos_group("mindspore-lib") {
55  deps = [ "mindspore-src/source/mindspore/lite/:mindspore_lib" ]
56}
57
58group("mindspore-test") {
59  testonly = true
60  deps = [
61    "test:mindspore_fuzz_test",
62    "test:mindspore_system_test",
63    "test:mindspore_unit_test",
64  ]
65}
66