1// Copyright (C) 2018 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 15cc_library_headers { 16 name: "librxcpp", 17 host_supported: true, 18 export_include_dirs: ["Rx/v2/src"] 19} 20 21cc_defaults { 22 name: "librxcpp-tests-defaults", 23 host_supported: true, 24 srcs: [ 25 "Rx/v2/test/**/*.cpp", 26 ], 27 header_libs: ["librxcpp"], 28 gtest: false, 29} 30 31cc_test { 32 // "Upstream" config. Use exceptions. 33 // Ensure that if we update from upstream later that the merged code 34 // is still working on Android. 35 name: "librxcpp-tests-upstream", 36 defaults: ["librxcpp-tests-defaults"], 37 whole_static_libs: ["libcatch2-upstream"], 38 // Allow exceptions for all the use of try/catch/throw in rxcpp. 39 cflags: ["-fexceptions"], 40} 41 42cc_test { 43 // "AOSP" config. Disable exceptions. 44 // Anything in AOSP using librxcpp will use it as this config, so 45 // that's what we really care about testing. 46 name: "librxcpp-tests", 47 defaults: ["librxcpp-tests-defaults"], 48 whole_static_libs: ["libcatch2"], 49} 50