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 "hilog:libhilog", 61 "ipc:ipc_core", 62 ] 63 subsystem_name = "notification" 64 part_name = "common_event_service" 65} 66 67ohos_executable("cem") { 68 sanitize = { 69 integer_overflow = true 70 ubsan = true 71 boundary_sanitize = true 72 cfi = true 73 cfi_cross_dso = true 74 debug = false 75 } 76 branch_protector_ret = "pac_ret" 77 78 deps = [ ":tools_cem_source_set" ] 79 80 external_deps = [ "hilog:libhilog" ] 81 82 install_enable = true 83 84 subsystem_name = "notification" 85 part_name = "common_event_service" 86} 87 88group("tools_cem") { 89 deps = [ ":cem" ] 90} 91