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 | |
| 15 | cc_defaults { |
| 16 | name: "gmock_flags", |
| 17 | |
| 18 | local_include_dirs: ["include"], |
| 19 | export_include_dirs: ["include"], |
| 20 | |
Chih-Hung Hsieh | 25fa0a7 | 2017-09-28 11:27:32 -0700 | [diff] [blame^] | 21 | cflags: [ |
| 22 | "-Wall", |
| 23 | "-Werror", |
| 24 | "-Wno-missing-field-initializers", |
| 25 | "-Wno-sign-compare", |
| 26 | "-Wno-unused-parameter", |
| 27 | ], |
Dan Albert | 69ab970 | 2016-03-01 17:50:19 -0800 | [diff] [blame] | 28 | } |
| 29 | |
| 30 | cc_defaults { |
| 31 | name: "gmock_ndk", |
| 32 | sdk_version: "9", |
| 33 | stl: "gnustl_static", |
| 34 | cppflags: ["-std=c++11"], |
| 35 | } |
| 36 | |
| 37 | cc_defaults { |
| 38 | name: "gmock_defaults", |
| 39 | host_supported: true, |
| 40 | sanitize: { |
| 41 | never: true, |
| 42 | }, |
| 43 | target: { |
Dan Willemsen | dd43b99 | 2017-09-20 13:39:42 -0700 | [diff] [blame] | 44 | linux_bionic: { |
| 45 | enabled: true, |
| 46 | }, |
Dan Albert | 69ab970 | 2016-03-01 17:50:19 -0800 | [diff] [blame] | 47 | windows: { |
| 48 | enabled: true, |
| 49 | }, |
| 50 | }, |
| 51 | } |
| 52 | |
| 53 | cc_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 | |
| 60 | cc_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 | |
| 67 | cc_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 Willemsen | bff63a6 | 2017-04-07 14:11:05 -0700 | [diff] [blame] | 73 | vendor_available: true, |
Dan Albert | 69ab970 | 2016-03-01 17:50:19 -0800 | [diff] [blame] | 74 | } |
| 75 | |
| 76 | cc_library_static { |
| 77 | name: "libgmock_main", |
| 78 | defaults: ["gmock_defaults", "gmock_flags"], |
| 79 | srcs: ["src/gmock_main.cc"], |
| 80 | static_libs: ["libgtest"], |
Dan Willemsen | bff63a6 | 2017-04-07 14:11:05 -0700 | [diff] [blame] | 81 | vendor_available: true, |
Dan Albert | 69ab970 | 2016-03-01 17:50:19 -0800 | [diff] [blame] | 82 | } |
| 83 | |
| 84 | // Deprecated: use libgmock instead |
| 85 | cc_library_host_static { |
| 86 | name: "libgmock_host", |
| 87 | defaults: ["gmock_defaults", "gmock_flags"], |
| 88 | whole_static_libs: ["libgmock"], |
| 89 | } |
| 90 | |
| 91 | cc_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. |