Home | History | Annotate | Download | only in googlemock
      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: [
     22         "-Wall",
     23         "-Werror",
     24         "-Wno-missing-field-initializers",
     25         "-Wno-sign-compare",
     26         "-Wno-unused-parameter",
     27     ],
     28 }
     29 
     30 cc_defaults {
     31     name: "gmock_ndk",
     32     sdk_version: "9",
     33     stl: "c++_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: {
     44         linux_bionic: {
     45             enabled: true,
     46         },
     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_c++"],
     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_c++"],
     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"],
     73     vendor_available: true,
     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"],
     81     vendor_available: true,
     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.
     98