blob: 4ae250fa22b144a905870fc2eed265da24e5ad50 [file] [log] [blame]
Dan Willemsen22ebec62018-10-24 17:44:49 -07001// 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
Bob Badourf3d95322021-02-12 14:48:59 -080015package {
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
Dan Willemsen22ebec62018-10-24 17:44:49 -070024cc_defaults {
25 name: "dicttoolkit_defaults",
26
27 cflags: [
28 "-Werror",
29 "-Wall",
30 "-Wextra",
31 "-Weffc++",
32 "-Wformat=2",
33 "-Wcast-qual",
34 "-Wcast-align",
35 "-Wwrite-strings",
36 "-Wfloat-equal",
37 "-Wpointer-arith",
38 "-Winit-self",
39 "-Wredundant-decls",
40 "-Woverloaded-virtual",
41 "-Wsign-promo",
42 "-Wno-system-headers",
43
44 // To suppress compiler warnings for unused variables/functions used for debug features etc.
45 "-Wno-unused-parameter",
46 "-Wno-unused-function",
47 ],
48
Orion Hodson54c4f2a2020-04-03 12:45:16 +010049 header_libs: ["jni_headers"],
Dan Willemsen22ebec62018-10-24 17:44:49 -070050 local_include_dirs: ["src"],
51 // TODO
52 include_dirs: ["packages/inputmethods/LatinIME/native/jni/src"],
53
54 product_variables: {
55 unbundled_build: {
56 enabled: false,
57 },
58 },
59}
60
61cc_library_host_static {
62 name: "liblatinime_dicttoolkit",
63 defaults: ["dicttoolkit_defaults"],
64
65 srcs: [
66 "src/command_executors/diff_executor.cpp",
67 "src/command_executors/header_executor.cpp",
68 "src/command_executors/help_executor.cpp",
69 "src/command_executors/info_executor.cpp",
70 "src/command_executors/makedict_executor.cpp",
71 "src/offdevice_intermediate_dict/offdevice_intermediate_dict.cpp",
72 "src/utils/arguments_parser.cpp",
73 "src/utils/command_utils.cpp",
74 "src/utils/utf8_utils.cpp",
75
76 ":LATIN_IME_CORE_SRC_FILES",
77 ],
78}
79
80cc_binary_host {
81 name: "dicttoolkit",
82 defaults: ["dicttoolkit_defaults"],
83
84 srcs: ["dict_toolkit_main.cpp"],
85 static_libs: ["liblatinime_dicttoolkit"],
86}
87
88cc_test_host {
89 name: "dicttoolkit_unittests",
90 defaults: ["dicttoolkit_defaults"],
91
92 srcs: [
93 "tests/command_executors/diff_executor_test.cpp",
94 "tests/command_executors/header_executor_test.cpp",
95 "tests/command_executors/info_executor_test.cpp",
96 "tests/command_executors/makedict_executor_test.cpp",
97 "tests/dict_toolkit_defines_test.cpp",
98 "tests/offdevice_intermediate_dict/offdevice_intermediate_dict_test.cpp",
99 "tests/utils/arguments_parser_test.cpp",
100 "tests/utils/command_utils_test.cpp",
101 "tests/utils/utf8_utils_test.cpp",
102 ],
103 static_libs: ["liblatinime_dicttoolkit"],
104}