1// 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 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 "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 25cc_defaults { 26 name: "gmock_flags", 27 28 local_include_dirs: ["include"], 29 export_include_dirs: ["include"], 30 31 cflags: [ 32 "-Wall", 33 "-Werror", 34 "-Wno-missing-field-initializers", 35 "-Wno-sign-compare", 36 "-Wno-unused-parameter", 37 ], 38} 39 40cc_defaults { 41 name: "gmock_ndk", 42 sdk_version: "9", 43 stl: "c++_static", 44 cppflags: ["-std=c++11"], 45} 46 47cc_defaults { 48 name: "gmock_defaults", 49 host_supported: true, 50 target: { 51 linux_bionic: { 52 enabled: true, 53 }, 54 windows: { 55 enabled: true, 56 }, 57 }, 58} 59 60cc_library_static { 61 name: "libgmock_ndk", 62 defaults: [ 63 "gmock_ndk", 64 "gmock_flags", 65 ], 66 srcs: ["src/gmock-all.cc"], 67 static_libs: ["libgtest_ndk_c++"], 68} 69 70cc_library_static { 71 name: "libgmock_main_ndk", 72 defaults: [ 73 "gmock_ndk", 74 "gmock_flags", 75 ], 76 srcs: ["src/gmock_main.cc"], 77 static_libs: ["libgtest_ndk_c++"], 78} 79 80cc_library_static { 81 name: "libgmock", 82 defaults: [ 83 "gmock_defaults", 84 "gmock_flags", 85 ], 86 srcs: ["src/gmock-all.cc"], 87 rtti: true, 88 static_libs: ["libgtest"], 89 vendor_available: true, 90} 91 92cc_library_static { 93 name: "libgmock_main", 94 defaults: [ 95 "gmock_defaults", 96 "gmock_flags", 97 ], 98 srcs: ["src/gmock_main.cc"], 99 static_libs: ["libgtest"], 100 vendor_available: true, 101} 102 103// Deprecated: use libgmock instead 104cc_library_host_static { 105 name: "libgmock_host", 106 defaults: [ 107 "gmock_defaults", 108 "gmock_flags", 109 ], 110 whole_static_libs: ["libgmock"], 111} 112 113cc_library_host_static { 114 name: "libgmock_main_host", 115 defaults: [ 116 "gmock_defaults", 117 "gmock_flags", 118 ], 119 whole_static_libs: ["libgmock_main"], 120} 121