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("//build/ohos.gni") 15import("//src/ts.gni") 16 17ohos_source_set("trace_data") { 18 sources = [ 19 "trace_data_cache.cpp", 20 "trace_data_cache.h", 21 "trace_data_cache_base.cpp", 22 "trace_data_cache_base.h", 23 "trace_data_cache_reader.cpp", 24 "trace_data_cache_reader.h", 25 "trace_data_cache_writer.cpp", 26 "trace_data_cache_writer.h", 27 "trace_data_db.cpp", 28 "trace_data_db.h", 29 "trace_stdtype.cpp", 30 "trace_stdtype.h", 31 ] 32 33 if (enable_ts_utest && !use_wasm) { 34 cflags = [ 35 "-fprofile-arcs", 36 "-ftest-coverage", 37 ] 38 ldflags = [ 39 "-fprofile-arcs", 40 "-ftest-coverage", 41 "--coverage", 42 ] 43 if (is_macx && is_test) { 44 cflags += [ "-D UT_MAC" ] 45 } 46 } 47 include_dirs = [ 48 "//third_party/sqlite/include", 49 "//src", 50 "//src/base", 51 "//src/include", 52 "//src/table", 53 ".", 54 "${OHOS_PROTO_GEN}/types/plugins/memory_data", 55 "//third_party/protobuf/src", 56 ] 57} 58