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("../../../dmsfwk.gni") 16 17config("tests_public_config") { 18 visibility = [ ":*" ] 19 include_dirs = [ 20 "${dms_path}/common/include", 21 "${dms_path}/interfaces/innerkits/distributed_event/include", 22 "${dms_path}/interfaces/innerkits/tests/", 23 "${dms_path}/services/dtbabilitymgr/include/", 24 ] 25 26 cflags = [] 27 if (target_cpu == "arm") { 28 cflags += [ "-DBINDER_IPC_32BIT" ] 29 } 30} 31 32ohos_executable("dms_sdk_demo") { 33 branch_protector_ret = "pac_ret" 34 sanitize = { 35 cfi = true 36 cfi_cross_dso = true 37 debug = false 38 } 39 40 deps = 41 [ "${dms_path}/interfaces/innerkits/distributed_event:distributed_sdk" ] 42 43 defines = [ 44 "HI_LOG_ENABLE", 45 "LOG_TAG=\"dms_sdk_demo\"", 46 "LOG_DOMAIN=0xD004170", 47 "DH_LOG_TAG=\"dms_sdk_demo\"", 48 "VERSION_STR=\"1.0.0.302\"", 49 "DMS_SOURCE", 50 ] 51 52 sources = [ 53 "${dms_path}/interfaces/innerkits/distributed_event/src/dms_listener_stub.cpp", 54 "${dms_path}/interfaces/innerkits/tests/dms_sdk_demo.cpp", 55 ] 56 57 public_configs = [ 58 ":tests_public_config", 59 "${dms_path}/services/dtbschedmgr/test/resource:coverage_flags", 60 ] 61 62 external_deps = [ 63 "c_utils:utils", 64 "hilog:libhilog", 65 "ipc:ipc_core", 66 "samgr:samgr_proxy", 67 ] 68 69 subsystem_name = "ability" 70 part_name = "dmsfwk" 71} 72