Dan Albert | 69ab970 | 2016-03-01 17:50:19 -0800 | [diff] [blame] | 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 | |
Bob Badour | d25457b | 2021-02-26 02:58:09 -0800 | [diff] [blame] | 15 | package { |
| 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 Albert | 69ab970 | 2016-03-01 17:50:19 -0800 | [diff] [blame] | 25 | cc_defaults { |
| 26 | name: "gmock_flags", |
| 27 | |
| 28 | local_include_dirs: ["include"], |
| 29 | export_include_dirs: ["include"], |
| 30 | |
Chih-Hung Hsieh | 25fa0a7 | 2017-09-28 11:27:32 -0700 | [diff] [blame] | 31 | cflags: [ |
| 32 | "-Wall", |
| 33 | "-Werror", |
| 34 | "-Wno-missing-field-initializers", |
| 35 | "-Wno-sign-compare", |
| 36 | "-Wno-unused-parameter", |
| 37 | ], |
Dan Albert | 69ab970 | 2016-03-01 17:50:19 -0800 | [diff] [blame] | 38 | } |
| 39 | |
| 40 | cc_defaults { |
| 41 | name: "gmock_ndk", |
| 42 | sdk_version: "9", |
Dan Albert | 4b54869 | 2017-12-20 15:23:37 -0800 | [diff] [blame] | 43 | stl: "c++_static", |
Dan Albert | 69ab970 | 2016-03-01 17:50:19 -0800 | [diff] [blame] | 44 | cppflags: ["-std=c++11"], |
| 45 | } |
| 46 | |
| 47 | cc_defaults { |
| 48 | name: "gmock_defaults", |
| 49 | host_supported: true, |
Dan Albert | 69ab970 | 2016-03-01 17:50:19 -0800 | [diff] [blame] | 50 | target: { |
Dan Willemsen | dd43b99 | 2017-09-20 13:39:42 -0700 | [diff] [blame] | 51 | linux_bionic: { |
| 52 | enabled: true, |
| 53 | }, |
Dan Albert | 69ab970 | 2016-03-01 17:50:19 -0800 | [diff] [blame] | 54 | windows: { |
| 55 | enabled: true, |
| 56 | }, |
| 57 | }, |
| 58 | } |
| 59 | |
| 60 | cc_library_static { |
| 61 | name: "libgmock_ndk", |
Dan Willemsen | 6c55922 | 2019-05-10 17:17:17 -0700 | [diff] [blame] | 62 | defaults: [ |
| 63 | "gmock_ndk", |
| 64 | "gmock_flags", |
| 65 | ], |
Dan Albert | 69ab970 | 2016-03-01 17:50:19 -0800 | [diff] [blame] | 66 | srcs: ["src/gmock-all.cc"], |
Dan Albert | 4b54869 | 2017-12-20 15:23:37 -0800 | [diff] [blame] | 67 | static_libs: ["libgtest_ndk_c++"], |
Dan Albert | 69ab970 | 2016-03-01 17:50:19 -0800 | [diff] [blame] | 68 | } |
| 69 | |
| 70 | cc_library_static { |
| 71 | name: "libgmock_main_ndk", |
Dan Willemsen | 6c55922 | 2019-05-10 17:17:17 -0700 | [diff] [blame] | 72 | defaults: [ |
| 73 | "gmock_ndk", |
| 74 | "gmock_flags", |
| 75 | ], |
Dan Albert | 69ab970 | 2016-03-01 17:50:19 -0800 | [diff] [blame] | 76 | srcs: ["src/gmock_main.cc"], |
Dan Albert | 4b54869 | 2017-12-20 15:23:37 -0800 | [diff] [blame] | 77 | static_libs: ["libgtest_ndk_c++"], |
Dan Albert | 69ab970 | 2016-03-01 17:50:19 -0800 | [diff] [blame] | 78 | } |
| 79 | |
| 80 | cc_library_static { |
| 81 | name: "libgmock", |
Dan Willemsen | 6c55922 | 2019-05-10 17:17:17 -0700 | [diff] [blame] | 82 | defaults: [ |
| 83 | "gmock_defaults", |
| 84 | "gmock_flags", |
| 85 | ], |
Dan Albert | 69ab970 | 2016-03-01 17:50:19 -0800 | [diff] [blame] | 86 | srcs: ["src/gmock-all.cc"], |
| 87 | rtti: true, |
| 88 | static_libs: ["libgtest"], |
Dan Willemsen | bff63a6 | 2017-04-07 14:11:05 -0700 | [diff] [blame] | 89 | vendor_available: true, |
Dan Albert | 69ab970 | 2016-03-01 17:50:19 -0800 | [diff] [blame] | 90 | } |
| 91 | |
| 92 | cc_library_static { |
| 93 | name: "libgmock_main", |
Dan Willemsen | 6c55922 | 2019-05-10 17:17:17 -0700 | [diff] [blame] | 94 | defaults: [ |
| 95 | "gmock_defaults", |
| 96 | "gmock_flags", |
| 97 | ], |
Dan Albert | 69ab970 | 2016-03-01 17:50:19 -0800 | [diff] [blame] | 98 | srcs: ["src/gmock_main.cc"], |
| 99 | static_libs: ["libgtest"], |
Dan Willemsen | bff63a6 | 2017-04-07 14:11:05 -0700 | [diff] [blame] | 100 | vendor_available: true, |
Dan Albert | 69ab970 | 2016-03-01 17:50:19 -0800 | [diff] [blame] | 101 | } |
| 102 | |
| 103 | // Deprecated: use libgmock instead |
| 104 | cc_library_host_static { |
| 105 | name: "libgmock_host", |
Dan Willemsen | 6c55922 | 2019-05-10 17:17:17 -0700 | [diff] [blame] | 106 | defaults: [ |
| 107 | "gmock_defaults", |
| 108 | "gmock_flags", |
| 109 | ], |
Dan Albert | 69ab970 | 2016-03-01 17:50:19 -0800 | [diff] [blame] | 110 | whole_static_libs: ["libgmock"], |
| 111 | } |
| 112 | |
| 113 | cc_library_host_static { |
| 114 | name: "libgmock_main_host", |
Dan Willemsen | 6c55922 | 2019-05-10 17:17:17 -0700 | [diff] [blame] | 115 | defaults: [ |
| 116 | "gmock_defaults", |
| 117 | "gmock_flags", |
| 118 | ], |
Dan Albert | 69ab970 | 2016-03-01 17:50:19 -0800 | [diff] [blame] | 119 | whole_static_libs: ["libgmock_main"], |
| 120 | } |