• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2023 Huawei Device Co., Ltd.
2# Licensed under the Apache License, Version 2.0 (the "License");
3# you may not use this file except in compliance with the License.
4# You may obtain a copy of the License at
5#
6#     http://www.apache.org/licenses/LICENSE-2.0
7#
8# Unless required by applicable law or agreed to in writing, software
9# distributed under the License is distributed on an "AS IS" BASIS,
10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11# See the License for the specific language governing permissions and
12# limitations under the License.
13
14import("//build/ohos.gni")
15import("//build/test.gni")
16import("../../../config.gni")
17import("../../../ressche_part.gni")
18
19ohos_shared_library("audio_schedule") {
20  branch_protector_ret = "pac_ret"
21  sanitize = {
22    cfi = true
23    cfi_cross_dso = true
24    cfi_vcall_icall_only = true
25    debug = false
26    integer_overflow = true
27    ubsan = true
28    boundary_sanitize = true
29  }
30
31  include_dirs = [
32    "include",
33    "../audioutils/include",
34    "../../../interfaces/inner_api/native/audiocommon/include",
35  ]
36
37  sources = [ "audio_schedule.cpp" ]
38
39  cflags = [
40    "-Wall",
41    "-Werror",
42  ]
43  cflags += [ "-Os" ]
44
45  deps = [ "../audioutils:audio_utils" ]
46
47  external_deps = [
48    "c_utils:utils",
49    "hilog:libhilog",
50    "ipc:ipc_single",
51    "samgr:samgr_proxy",
52    "init:libbegetutil",
53    "qos_manager:concurrent_task_client",
54    "qos_manager:qos"
55  ]
56
57  if (ressche_enable == true) {
58    external_deps += [ "resource_schedule_service:ressched_client" ]
59    cflags += [ "-DRESSCHE_ENABLE" ]
60  }
61
62  cflags_cc = cflags
63  cflags_cc += [ "-std=c++20" ]
64
65  subsystem_name = "multimedia"
66  part_name = "audio_framework"
67}
68
69ohos_unittest("audioschedule_unit_test") {
70  module_out_path = "audio_framework/audio_framework_route/audioschedule"
71
72  cflags = [
73    "-Wall",
74    "-Werror",
75    "-fno-access-control",
76  ]
77
78  include_dirs = [
79    "./include",
80    "../../../interfaces/inner_api/native/audiocommon/include/",
81    "../audioutils/include",
82  ]
83
84  sources = [
85    "test/unittest/audio_schedule_unit_test.cpp",
86  ]
87
88  deps = [
89    ":audio_schedule",
90    "../audioutils:audio_utils"
91  ]
92
93  defines = []
94
95  external_deps = [
96    "googletest:gmock",
97    "googletest:gtest",
98    "hilog:libhilog",
99    "init:libbegetutil",
100  ]
101
102  part_name = "audio_framework"
103  subsystem_name = "multimedia"
104}
105