1# Copyright (c) 2024 Shenzhen Kaihong Digital Industry Development 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("//build/test.gni") 16import("//foundation/CastEngine/castengine_wifi_display/config.gni") 17 18module_out_path = "sharing/agent" 19 20ohos_unittest("agent_unit_test") { 21 module_out_path = module_out_path 22 23 include_dirs = [ 24 "$SHARING_ROOT_DIR/services", 25 "$SHARING_ROOT_DIR/frameworks/innerkitsimpl", 26 "$SHARING_ROOT_DIR/services/utils/native/base/include", 27 ] 28 29 sources = [ 30 "sink_agent_unit_test.cpp", 31 "src_agent_unit_test.cpp", 32 ] 33 cflags = [ 34 "-Wall", 35 "-fno-rtti", 36 "-fno-exceptions", 37 "-fno-common", 38 "-fstack-protector-strong", 39 "-Wshadow", 40 "-FPIC", 41 "-FS", 42 "-O2", 43 "-D_FORTIFY_SOURCE=2", 44 "-fvisibility=hidden", 45 "-Wformat=2", 46 "-Wdate-time", 47 "-Werror", 48 "-Wextra", 49 "-Wimplicit-fallthrough", 50 "-Wsign-compare", 51 "-Wno-unused-parameter", 52 "-Wno-deprecated-declarations", 53 "-Dprivate=public", 54 "-Dprotected=public", 55 ] 56 57 cflags_cc = cflags 58 cflags_cc += [ "-std=c++17" ] 59 60 deps = [ 61 "$SHARING_ROOT_DIR/services:sharing_service", 62 "$SHARING_ROOT_DIR/services/common:sharing_common", 63 "//third_party/googletest:gtest_main", 64 ] 65 66 if (is_standard_system) { 67 external_deps = [ 68 "c_utils:utils", 69 "c_utils:utilsbase", 70 "graphic_surface:surface", 71 "hilog:libhilog", 72 "samgr:samgr_proxy", 73 ] 74 } else { 75 external_deps = [ "hilog:libhilog" ] 76 } 77} 78