blob: 898acff10dbc4923ffa9379d258945e5d21874d5 [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
15cc_defaults {
16 name: "gmock_flags",
17
18 local_include_dirs: ["include"],
19 export_include_dirs: ["include"],
20
Chih-Hung Hsieh25fa0a72017-09-28 11:27:32 -070021 cflags: [
22 "-Wall",
23 "-Werror",
24 "-Wno-missing-field-initializers",
25 "-Wno-sign-compare",
26 "-Wno-unused-parameter",
27 ],
Dan Albert69ab9702016-03-01 17:50:19 -080028}
29
30cc_defaults {
31 name: "gmock_ndk",
32 sdk_version: "9",
33 stl: "gnustl_static",
34 cppflags: ["-std=c++11"],
35}
36
37cc_defaults {
38 name: "gmock_defaults",
39 host_supported: true,
40 sanitize: {
41 never: true,
42 },
43 target: {
Dan Willemsendd43b992017-09-20 13:39:42 -070044 linux_bionic: {
45 enabled: true,
46 },
Dan Albert69ab9702016-03-01 17:50:19 -080047 windows: {
48 enabled: true,
49 },
50 },
51}
52
53cc_library_static {
54 name: "libgmock_ndk",
55 defaults: ["gmock_ndk", "gmock_flags"],
56 srcs: ["src/gmock-all.cc"],
57 static_libs: ["libgtest_ndk_gnustl"],
58}
59
60cc_library_static {
61 name: "libgmock_main_ndk",
62 defaults: ["gmock_ndk", "gmock_flags"],
63 srcs: ["src/gmock_main.cc"],
64 static_libs: ["libgtest_ndk_gnustl"],
65}
66
67cc_library_static {
68 name: "libgmock",
69 defaults: ["gmock_defaults", "gmock_flags"],
70 srcs: ["src/gmock-all.cc"],
71 rtti: true,
72 static_libs: ["libgtest"],
Dan Willemsenbff63a62017-04-07 14:11:05 -070073 vendor_available: true,
Dan Albert69ab9702016-03-01 17:50:19 -080074}
75
76cc_library_static {
77 name: "libgmock_main",
78 defaults: ["gmock_defaults", "gmock_flags"],
79 srcs: ["src/gmock_main.cc"],
80 static_libs: ["libgtest"],
Dan Willemsenbff63a62017-04-07 14:11:05 -070081 vendor_available: true,
Dan Albert69ab9702016-03-01 17:50:19 -080082}
83
84// Deprecated: use libgmock instead
85cc_library_host_static {
86 name: "libgmock_host",
87 defaults: ["gmock_defaults", "gmock_flags"],
88 whole_static_libs: ["libgmock"],
89}
90
91cc_library_host_static {
92 name: "libgmock_main_host",
93 defaults: ["gmock_defaults", "gmock_flags"],
94 whole_static_libs: ["libgmock_main"],
95}
96
97// Tests are in the Android.mk. Run with external/googletest/run_tests.py.