1# Copyright (c) 2021-2022 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/test.gni") 15import("../powermgr.gni") 16 17config("utils_config") { 18 include_dirs = [ "native/include" ] 19} 20 21declare_args() { 22 power_manager_feature_coverage = false 23} 24 25config("coverage_flags") { 26 if (power_manager_feature_coverage) { 27 cflags = [ "--coverage" ] 28 cflags_cc += [ "--coverage" ] 29 ldflags = [ "--coverage" ] 30 } 31} 32 33ohos_source_set("power_utils") { 34 sources = [ 35 "native/src/power_utils.cpp", 36 "native/src/power_xcollie.cpp", 37 ] 38 39 include_dirs = [ "${powermgr_inner_api}/native/include" ] 40 41 configs = [ "${powermgr_utils_path}:coverage_flags" ] 42 43 public_configs = [ ":utils_config" ] 44 45 external_deps = [ 46 "c_utils:utils", 47 "hicollie:libhicollie", 48 "hilog:libhilog", 49 ] 50 51 subsystem_name = "powermgr" 52 part_name = "${powermgr_part_name}" 53} 54