blob: 40473d432b809823dd1c0e054473afce666176df [file] [log] [blame]
Dan Albert69ab9702016-03-01 17:50:19 -08001// Copyright (C) 2016 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 Badourd25457b2021-02-26 02:58:09 -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 "external_googletest_license"
19 // to get the below license kinds:
20 // SPDX-license-identifier-Apache-2.0
21 // SPDX-license-identifier-BSD
22 default_applicable_licenses: ["external_googletest_license"],
23}
24
Dan Albert69ab9702016-03-01 17:50:19 -080025cc_defaults {
26 name: "gmock_flags",
27
28 local_include_dirs: ["include"],
29 export_include_dirs: ["include"],
30
Chih-Hung Hsieh25fa0a72017-09-28 11:27:32 -070031 cflags: [
32 "-Wall",
33 "-Werror",
34 "-Wno-missing-field-initializers",
35 "-Wno-sign-compare",
36 "-Wno-unused-parameter",
37 ],
Dan Albert69ab9702016-03-01 17:50:19 -080038}
39
40cc_defaults {
41 name: "gmock_ndk",
42 sdk_version: "9",
Dan Albert4b548692017-12-20 15:23:37 -080043 stl: "c++_static",
Dan Albert69ab9702016-03-01 17:50:19 -080044 cppflags: ["-std=c++11"],
45}
46
47cc_defaults {
48 name: "gmock_defaults",
49 host_supported: true,
Dan Albert69ab9702016-03-01 17:50:19 -080050 target: {
Dan Willemsendd43b992017-09-20 13:39:42 -070051 linux_bionic: {
52 enabled: true,
53 },
Dan Albert69ab9702016-03-01 17:50:19 -080054 windows: {
55 enabled: true,
56 },
57 },
58}
59
60cc_library_static {
61 name: "libgmock_ndk",
Dan Willemsen6c559222019-05-10 17:17:17 -070062 defaults: [
63 "gmock_ndk",
64 "gmock_flags",
65 ],
Dan Albert69ab9702016-03-01 17:50:19 -080066 srcs: ["src/gmock-all.cc"],
Dan Albert4b548692017-12-20 15:23:37 -080067 static_libs: ["libgtest_ndk_c++"],
Dan Albert69ab9702016-03-01 17:50:19 -080068}
69
70cc_library_static {
71 name: "libgmock_main_ndk",
Dan Willemsen6c559222019-05-10 17:17:17 -070072 defaults: [
73 "gmock_ndk",
74 "gmock_flags",
75 ],
Dan Albert69ab9702016-03-01 17:50:19 -080076 srcs: ["src/gmock_main.cc"],
Dan Albert4b548692017-12-20 15:23:37 -080077 static_libs: ["libgtest_ndk_c++"],
Dan Albert69ab9702016-03-01 17:50:19 -080078}
79
80cc_library_static {
81 name: "libgmock",
Dan Willemsen6c559222019-05-10 17:17:17 -070082 defaults: [
83 "gmock_defaults",
84 "gmock_flags",
85 ],
Dan Albert69ab9702016-03-01 17:50:19 -080086 srcs: ["src/gmock-all.cc"],
87 rtti: true,
88 static_libs: ["libgtest"],
Dan Willemsenbff63a62017-04-07 14:11:05 -070089 vendor_available: true,
Dan Albert69ab9702016-03-01 17:50:19 -080090}
91
92cc_library_static {
93 name: "libgmock_main",
Dan Willemsen6c559222019-05-10 17:17:17 -070094 defaults: [
95 "gmock_defaults",
96 "gmock_flags",
97 ],
Dan Albert69ab9702016-03-01 17:50:19 -080098 srcs: ["src/gmock_main.cc"],
99 static_libs: ["libgtest"],
Dan Willemsenbff63a62017-04-07 14:11:05 -0700100 vendor_available: true,
Dan Albert69ab9702016-03-01 17:50:19 -0800101}
102
103// Deprecated: use libgmock instead
104cc_library_host_static {
105 name: "libgmock_host",
Dan Willemsen6c559222019-05-10 17:17:17 -0700106 defaults: [
107 "gmock_defaults",
108 "gmock_flags",
109 ],
Dan Albert69ab9702016-03-01 17:50:19 -0800110 whole_static_libs: ["libgmock"],
111}
112
113cc_library_host_static {
114 name: "libgmock_main_host",
Dan Willemsen6c559222019-05-10 17:17:17 -0700115 defaults: [
116 "gmock_defaults",
117 "gmock_flags",
118 ],
Dan Albert69ab9702016-03-01 17:50:19 -0800119 whole_static_libs: ["libgmock_main"],
120}