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("//base/notification/common_event_service/event.gni") 15import("//build/ohos.gni") 16 17config("tools_cem_config") { 18 include_dirs = [ "include" ] 19} 20 21ohos_source_set("tools_cem_source_set") { 22 sanitize = { 23 integer_overflow = true 24 ubsan = true 25 boundary_sanitize = true 26 cfi = true 27 cfi_cross_dso = true 28 debug = false 29 } 30 31 branch_protector_ret = "pac_ret" 32 33 public_configs = [ ":tools_cem_config" ] 34 35 sources = [ 36 "src/common_event_command.cpp", 37 "src/main.cpp", 38 "src/shell_command.cpp", 39 ] 40 41 cflags = [] 42 if (target_cpu == "arm") { 43 cflags += [ "-DBINDER_IPC_32BIT" ] 44 } 45 46 deps = [ 47 "${ces_core_path}:cesfwk_core", 48 "${ces_native_path}:cesfwk_innerkits", 49 ] 50 51 defines = [] 52 if (build_variant == "user") { 53 defines += [ "CEM_BUILD_VARIANT_USER" ] 54 } 55 56 external_deps = [ 57 "ability_base:want", 58 "c_utils:utils", 59 "eventhandler:libeventhandler", 60 "ffrt:libffrt", 61 "hilog:libhilog", 62 "ipc:ipc_core", 63 ] 64 subsystem_name = "notification" 65 part_name = "common_event_service" 66} 67 68ohos_executable("cem") { 69 sanitize = { 70 integer_overflow = true 71 ubsan = true 72 boundary_sanitize = true 73 cfi = true 74 cfi_cross_dso = true 75 debug = false 76 } 77 branch_protector_ret = "pac_ret" 78 79 deps = [ ":tools_cem_source_set" ] 80 81 external_deps = [ "hilog:libhilog" ] 82 83 install_enable = true 84 85 subsystem_name = "notification" 86 part_name = "common_event_service" 87} 88 89group("tools_cem") { 90 deps = [ ":cem" ] 91} 92