1# Copyright (c) 2021 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("../batterystats.gni") 15 16config("batterystats_utils_config") { 17 include_dirs = [ 18 "native/include", 19 "${batterystats_inner_api}/include", 20 ] 21} 22 23declare_args() { 24 battery_statistics_feature_coverage = false 25} 26 27config("coverage_flags") { 28 if (battery_statistics_feature_coverage) { 29 cflags = [ "--coverage" ] 30 cflags_cc = [ "--coverage" ] 31 ldflags = [ "--coverage" ] 32 } 33} 34 35ohos_source_set("batterystats_utils") { 36 sources = [ 37 "native/src/stats_helper.cpp", 38 "native/src/stats_hisysevent.cpp", 39 "native/src/stats_utils.cpp", 40 ] 41 42 configs = [ "${batterystats_utils_path}:coverage_flags" ] 43 44 public_configs = [ ":batterystats_utils_config" ] 45 external_deps = [ 46 "c_utils:utils", 47 "hilog:libhilog", 48 ] 49 subsystem_name = "powermgr" 50 part_name = "${batterystats_part_name}" 51} 52