19762338dSopenharmony_ci# Copyright (c) 2021-2023 Huawei Device Co., Ltd.
29762338dSopenharmony_ci# Licensed under the Apache License, Version 2.0 (the "License");
39762338dSopenharmony_ci# you may not use this file except in compliance with the License.
49762338dSopenharmony_ci# You may obtain a copy of the License at
59762338dSopenharmony_ci#
69762338dSopenharmony_ci# http://www.apache.org/licenses/LICENSE-2.0
79762338dSopenharmony_ci#
89762338dSopenharmony_ci# Unless required by applicable law or agreed to in writing, software
99762338dSopenharmony_ci# distributed under the License is distributed on an "AS IS" BASIS,
109762338dSopenharmony_ci# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
119762338dSopenharmony_ci# See the License for the specific language governing permissions and
129762338dSopenharmony_ci# limitations under the License.
139762338dSopenharmony_ci
149762338dSopenharmony_ciimport("//base/location/config.gni")
159762338dSopenharmony_ciimport("//build/ohos_var.gni")
169762338dSopenharmony_ciimport("//drivers/hdf_core/adapter/uhdf2/uhdf.gni")
179762338dSopenharmony_ciimport("//test/xts/tools/build/suite.gni")
189762338dSopenharmony_ciLOCATION_PATH = "../"
199762338dSopenharmony_ci
209762338dSopenharmony_cimodule_output_path = "hdf/location/agnss"
219762338dSopenharmony_ciohos_moduletest_suite("HatsHdfLocationagnssTest") {
229762338dSopenharmony_ci  module_out_path = module_output_path
239762338dSopenharmony_ci  configs = [ ":hdf_agnss" ]
249762338dSopenharmony_ci
259762338dSopenharmony_ci  sources = [ "agnss_hdi_test.cpp" ]
269762338dSopenharmony_ci
279762338dSopenharmony_ci  defines = []
289762338dSopenharmony_ci
299762338dSopenharmony_ci  deps = [
309762338dSopenharmony_ci    "//third_party/googletest:gmock_main",
319762338dSopenharmony_ci    "//third_party/googletest:gtest_main",
329762338dSopenharmony_ci  ]
339762338dSopenharmony_ci  if (is_standard_system) {
349762338dSopenharmony_ci    external_deps = [
359762338dSopenharmony_ci      "c_utils:utils",
369762338dSopenharmony_ci      "cellular_data:tel_cellular_data_api",
379762338dSopenharmony_ci      "core_service:tel_core_service_api",
389762338dSopenharmony_ci      "hdf_core:libhdf_host",
399762338dSopenharmony_ci      "hdf_core:libhdf_ipc_adapter",
409762338dSopenharmony_ci      "hdf_core:libhdi",
419762338dSopenharmony_ci      "hilog:libhilog",
429762338dSopenharmony_ci      "ipc:ipc_single",
439762338dSopenharmony_ci    ]
449762338dSopenharmony_ci    if (hdf_drivers_interface_location_agnss_enable) {
459762338dSopenharmony_ci      external_deps +=
469762338dSopenharmony_ci          [ "drivers_interface_location_agnss:liblocation_agnss_proxy_2.0" ]
479762338dSopenharmony_ci      defines += [ "HDF_DRIVERS_INTERFACE_AGNSS_ENABLE" ]
489762338dSopenharmony_ci    }
499762338dSopenharmony_ci    if (hdf_drivers_interface_location_geofence_enable) {
509762338dSopenharmony_ci      external_deps += [
519762338dSopenharmony_ci        "drivers_interface_location_geofence:liblocation_geofence_proxy_2.0",
529762338dSopenharmony_ci      ]
539762338dSopenharmony_ci      defines += [ "HDF_DRIVERS_INTERFACE_GEOFENCE_ENABLE" ]
549762338dSopenharmony_ci    }
559762338dSopenharmony_ci    if (hdf_drivers_interface_location_gnss_enable) {
569762338dSopenharmony_ci      external_deps +=
579762338dSopenharmony_ci          [ "drivers_interface_location_gnss:liblocation_gnss_proxy_2.0" ]
589762338dSopenharmony_ci      defines += [ "FEATURE_GNSS_SUPPORT" ]
599762338dSopenharmony_ci    }
609762338dSopenharmony_ci  } else {
619762338dSopenharmony_ci    external_deps = [
629762338dSopenharmony_ci      "hilog:libhilog",
639762338dSopenharmony_ci      "ipc:ipc_single",
649762338dSopenharmony_ci    ]
659762338dSopenharmony_ci  }
669762338dSopenharmony_ci
679762338dSopenharmony_ci  subsystem_name = "xts"
689762338dSopenharmony_ci  part_name = "hats"
699762338dSopenharmony_ci}
709762338dSopenharmony_ci
719762338dSopenharmony_ciconfig("hdf_agnss") {
729762338dSopenharmony_ci  include_dirs = [
739762338dSopenharmony_ci    "include",
749762338dSopenharmony_ci    "$LOCATION_PATH/gnss",
759762338dSopenharmony_ci  ]
769762338dSopenharmony_ci  cflags = [
779762338dSopenharmony_ci    "-Wall",
789762338dSopenharmony_ci    "-Wextra",
799762338dSopenharmony_ci    "-Werror",
809762338dSopenharmony_ci    "-fsigned-char",
819762338dSopenharmony_ci    "-fno-common",
829762338dSopenharmony_ci    "-fno-strict-aliasing",
839762338dSopenharmony_ci  ]
849762338dSopenharmony_ci}
85