blob: 00a2f1b2d45e0786b9aef2c33fe2e4f7e282e7bf [file] [log] [blame]
Tony Mak5e8c07f2020-07-21 18:56:50 +01001// Copyright (C) 2020 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//
15
Bob Badourfa11e892021-02-12 20:51:23 -080016package {
17 default_applicable_licenses: ["external_marisa-trie_license"],
18}
19
20// Added automatically by a large-scale-change that took the approach of
21// 'apply every license found to every target'. While this makes sure we respect
22// every license restriction, it may not be entirely correct.
23//
24// e.g. GPL in an MIT project might only apply to the contrib/ directory.
25//
26// Please consider splitting the single license below into multiple licenses,
27// taking care not to lose any license_kind information, and overriding the
28// default license using the 'licenses: [...]' property on targets as needed.
29//
30// For unused files, consider creating a 'fileGroup' with "//visibility:private"
31// to attach the license to, and including a comment whether the files may be
32// used in the current project.
33// See: http://go/android-license-faq
34license {
35 name: "external_marisa-trie_license",
36 visibility: [":__subpackages__"],
37 license_kinds: [
38 "SPDX-license-identifier-BSD",
39 "SPDX-license-identifier-BSD-2-Clause",
40 "SPDX-license-identifier-LGPL",
41 "SPDX-license-identifier-LGPL-2.1+",
42 ],
43 license_text: [
44 "COPYING.md",
45 ],
46}
47
Tony Mak5e8c07f2020-07-21 18:56:50 +010048cc_library {
49 name: "marisa-trie",
50 sdk_version: "current",
51 cflags: [
52 "-Werror",
53 "-Wall",
54 "-fexceptions",
55 "-Wno-implicit-fallthrough",
56 ],
57 stl: "libc++_static",
58 export_include_dirs: ["include", "lib"],
59 srcs: [
60 "lib/**/*.cc"
61 ],
62 apex_available: [
63 "//apex_available:platform",
64 "com.android.extservices",
65 ],
66 visibility: ["//external/libtextclassifier:__subpackages__"],
67}
68
69cc_defaults {
70 name: "marisa-trie-test-defaults",
71 sdk_version: "current",
72 static_libs: ["marisa-trie"],
73 stl: "libc++_static",
74 cflags: [
75 "-Werror",
76 "-Wall",
77 "-fexceptions",
78 "-Wno-implicit-fallthrough",
79 ],
80}
81
82cc_binary {
83 name: "marisa-marisa-test",
84 srcs: ["tests/marisa-test.cc"],
85 defaults: ["marisa-trie-test-defaults"],
86}
87
88cc_binary {
89 name: "marisa-base-test",
90 srcs: ["tests/base-test.cc"],
91 defaults: ["marisa-trie-test-defaults"],
92}
93
94cc_binary {
95 name: "marisa-vector-test",
96 srcs: ["tests/vector-test.cc"],
97 defaults: ["marisa-trie-test-defaults"],
98}
99
100cc_binary {
101 name: "marisa-trie-test",
102 srcs: ["tests/trie-test.cc"],
103 defaults: ["marisa-trie-test-defaults"],
104}