1# Copyright (c) 2021-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("//base/location/config.gni")
15import("//build/ohos_var.gni")
16import("//drivers/hdf_core/adapter/uhdf2/uhdf.gni")
17import("//test/xts/tools/build/suite.gni")
18
19module_output_path = "hdf/location/geofence"
20ohos_moduletest_suite("HatsHdfLocationgeofenceTest") {
21  module_out_path = module_output_path
22
23  sources = [ "location_geofence_test.cpp" ]
24
25  configs = [ ":hdf_geofence" ]
26
27  defines = []
28
29  deps = [
30    "//third_party/googletest:gmock_main",
31    "//third_party/googletest:gtest_main",
32  ]
33  if (is_standard_system) {
34    external_deps = [
35      "c_utils:utils",
36      "hdf_core:libhdf_host",
37      "hdf_core:libhdf_ipc_adapter",
38      "hdf_core:libhdi",
39      "hilog:libhilog",
40      "ipc:ipc_single",
41    ]
42    if (hdf_drivers_interface_location_agnss_enable) {
43      external_deps +=
44          [ "drivers_interface_location_agnss:liblocation_agnss_proxy_2.0" ]
45      defines += [ "HDF_DRIVERS_INTERFACE_AGNSS_ENABLE" ]
46    }
47    if (hdf_drivers_interface_location_geofence_enable) {
48      external_deps += [
49        "drivers_interface_location_geofence:liblocation_geofence_proxy_2.0",
50      ]
51      defines += [ "HDF_DRIVERS_INTERFACE_GEOFENCE_ENABLE" ]
52    }
53    if (hdf_drivers_interface_location_gnss_enable) {
54      external_deps +=
55          [ "drivers_interface_location_gnss:liblocation_gnss_proxy_2.0" ]
56      defines += [ "FEATURE_GNSS_SUPPORT" ]
57    }
58  } else {
59    external_deps = [
60      "hilog:libhilog",
61      "ipc:ipc_single",
62    ]
63  }
64
65  subsystem_name = "xts"
66  part_name = "hats"
67}
68
69config("hdf_geofence") {
70  include_dirs = [ "include" ]
71  cflags = [
72    "-Wall",
73    "-Wextra",
74    "-Werror",
75    "-fsigned-char",
76    "-fno-common",
77    "-fno-strict-aliasing",
78  ]
79}
80