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 | |
| 21 | cflags: ["-Wno-missing-field-initializers"], |
| 22 | } |
| 23 | |
| 24 | cc_defaults { |
| 25 | name: "gmock_ndk", |
| 26 | sdk_version: "9", |
| 27 | stl: "gnustl_static", |
| 28 | cppflags: ["-std=c++11"], |
| 29 | } |
| 30 | |
| 31 | cc_defaults { |
| 32 | name: "gmock_defaults", |
| 33 | host_supported: true, |
| 34 | sanitize: { |
| 35 | never: true, |
| 36 | }, |
| 37 | target: { |
| 38 | windows: { |
| 39 | enabled: true, |
| 40 | }, |
| 41 | }, |
| 42 | } |
| 43 | |
| 44 | cc_library_static { |
| 45 | name: "libgmock_ndk", |
| 46 | defaults: ["gmock_ndk", "gmock_flags"], |
| 47 | srcs: ["src/gmock-all.cc"], |
| 48 | static_libs: ["libgtest_ndk_gnustl"], |
| 49 | } |
| 50 | |
| 51 | cc_library_static { |
| 52 | name: "libgmock_main_ndk", |
| 53 | defaults: ["gmock_ndk", "gmock_flags"], |
| 54 | srcs: ["src/gmock_main.cc"], |
| 55 | static_libs: ["libgtest_ndk_gnustl"], |
| 56 | } |
| 57 | |
| 58 | cc_library_static { |
| 59 | name: "libgmock", |
| 60 | defaults: ["gmock_defaults", "gmock_flags"], |
| 61 | srcs: ["src/gmock-all.cc"], |
| 62 | rtti: true, |
| 63 | static_libs: ["libgtest"], |
| 64 | } |
| 65 | |
| 66 | cc_library_static { |
| 67 | name: "libgmock_main", |
| 68 | defaults: ["gmock_defaults", "gmock_flags"], |
| 69 | srcs: ["src/gmock_main.cc"], |
| 70 | static_libs: ["libgtest"], |
| 71 | } |
| 72 | |
| 73 | // Deprecated: use libgmock instead |
| 74 | cc_library_host_static { |
| 75 | name: "libgmock_host", |
| 76 | defaults: ["gmock_defaults", "gmock_flags"], |
| 77 | whole_static_libs: ["libgmock"], |
| 78 | } |
| 79 | |
| 80 | cc_library_host_static { |
| 81 | name: "libgmock_main_host", |
| 82 | defaults: ["gmock_defaults", "gmock_flags"], |
| 83 | whole_static_libs: ["libgmock_main"], |
| 84 | } |
| 85 | |
| 86 | // Tests are in the Android.mk. Run with external/googletest/run_tests.py. |