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: ["-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     vendor_available: true,
     65 }
     66 
     67 cc_library_static {
     68     name: "libgmock_main",
     69     defaults: ["gmock_defaults", "gmock_flags"],
     70     srcs: ["src/gmock_main.cc"],
     71     static_libs: ["libgtest"],
     72     vendor_available: true,
     73 }
     74 
     75 // Deprecated: use libgmock instead
     76 cc_library_host_static {
     77     name: "libgmock_host",
     78     defaults: ["gmock_defaults", "gmock_flags"],
     79     whole_static_libs: ["libgmock"],
     80 }
     81 
     82 cc_library_host_static {
     83     name: "libgmock_main_host",
     84     defaults: ["gmock_defaults", "gmock_flags"],
     85     whole_static_libs: ["libgmock_main"],
     86 }
     87 
     88 // Tests are in the Android.mk. Run with external/googletest/run_tests.py.
     89