1// Copyright (C) 2014 The Android Open Source Project 2// 3// Licensed under the Apache License, Version 2.0 (the "License"); 4// you may not use this file except in compliance with the License. 5// You may obtain a copy of the License at 6// 7// http://www.apache.org/licenses/LICENSE-2.0 8// 9// Unless required by applicable law or agreed to in writing, software 10// distributed under the License is distributed on an "AS IS" BASIS, 11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12// See the License for the specific language governing permissions and 13// limitations under the License. 14 15package { 16 // See: http://go/android-license-faq 17 // A large-scale-change added 'default_applicable_licenses' to import 18 // all of the 'license_kinds' from "packages_inputmethods_LatinIME_license" 19 // to get the below license kinds: 20 // SPDX-license-identifier-Apache-2.0 21 default_applicable_licenses: ["packages_inputmethods_LatinIME_license"], 22} 23 24cc_defaults { 25 name: "dicttoolkit_defaults", 26 27 cpp_std: "gnu++17", 28 cflags: [ 29 "-Werror", 30 "-Wall", 31 "-Wextra", 32 "-Weffc++", 33 "-Wformat=2", 34 "-Wcast-qual", 35 "-Wcast-align", 36 "-Wwrite-strings", 37 "-Wfloat-equal", 38 "-Wpointer-arith", 39 "-Winit-self", 40 "-Wredundant-decls", 41 "-Woverloaded-virtual", 42 "-Wsign-promo", 43 "-Wno-system-headers", 44 45 // To suppress compiler warnings for unused variables/functions used for debug features etc. 46 "-Wno-unused-parameter", 47 "-Wno-unused-function", 48 ], 49 50 header_libs: ["jni_headers"], 51 local_include_dirs: ["src"], 52 // TODO 53 include_dirs: ["packages/inputmethods/LatinIME/native/jni/src"], 54 55 product_variables: { 56 unbundled_build: { 57 enabled: false, 58 }, 59 }, 60} 61 62cc_library_host_static { 63 name: "liblatinime_dicttoolkit", 64 defaults: ["dicttoolkit_defaults"], 65 66 srcs: [ 67 "src/command_executors/diff_executor.cpp", 68 "src/command_executors/header_executor.cpp", 69 "src/command_executors/help_executor.cpp", 70 "src/command_executors/info_executor.cpp", 71 "src/command_executors/makedict_executor.cpp", 72 "src/offdevice_intermediate_dict/offdevice_intermediate_dict.cpp", 73 "src/utils/arguments_parser.cpp", 74 "src/utils/command_utils.cpp", 75 "src/utils/utf8_utils.cpp", 76 77 ":LATIN_IME_CORE_SRC_FILES", 78 ], 79} 80 81cc_binary_host { 82 name: "dicttoolkit", 83 defaults: ["dicttoolkit_defaults"], 84 85 srcs: ["dict_toolkit_main.cpp"], 86 static_libs: ["liblatinime_dicttoolkit"], 87} 88 89cc_test_host { 90 name: "dicttoolkit_unittests", 91 defaults: ["dicttoolkit_defaults"], 92 93 srcs: [ 94 "tests/command_executors/diff_executor_test.cpp", 95 "tests/command_executors/header_executor_test.cpp", 96 "tests/command_executors/info_executor_test.cpp", 97 "tests/command_executors/makedict_executor_test.cpp", 98 "tests/dict_toolkit_defines_test.cpp", 99 "tests/offdevice_intermediate_dict/offdevice_intermediate_dict_test.cpp", 100 "tests/utils/arguments_parser_test.cpp", 101 "tests/utils/command_utils_test.cpp", 102 "tests/utils/utf8_utils_test.cpp", 103 ], 104 static_libs: ["liblatinime_dicttoolkit"], 105} 106