Nicolas Capens | 9e5f50f | 2019-09-20 10:15:53 -0400 | [diff] [blame] | 1 | # Copyright 2019 The Marl Authors. |
| 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 | # https://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_library( |
| 16 | name = "marl", |
| 17 | srcs = glob( |
| 18 | [ |
| 19 | "src/**/*.cpp", |
| 20 | "src/**/*.c", |
| 21 | "src/**/*.h", |
| 22 | ], |
| 23 | exclude = glob([ |
Ben Clayton | ec288e2 | 2020-02-09 19:20:01 +0000 | [diff] [blame] | 24 | "src/**/*_bench.cpp", |
Nicolas Capens | 9e5f50f | 2019-09-20 10:15:53 -0400 | [diff] [blame] | 25 | "src/**/*_test.cpp", |
| 26 | ]), |
| 27 | ) + select({ |
| 28 | "@bazel_tools//src/conditions:windows": [], |
| 29 | "//conditions:default": glob(["src/**/*.S"]), |
| 30 | }), |
| 31 | hdrs = glob([ |
| 32 | "include/marl/**/*.h", |
| 33 | ]), |
| 34 | includes = [ |
| 35 | "include", |
| 36 | ], |
| 37 | linkopts = select({ |
| 38 | "@bazel_tools//src/conditions:linux_x86_64": ["-pthread"], |
| 39 | "//conditions:default": [], |
| 40 | }), |
| 41 | visibility = [ |
| 42 | "//visibility:public", |
| 43 | ], |
| 44 | ) |
| 45 | |
| 46 | cc_test( |
| 47 | name = "tests", |
| 48 | srcs = glob([ |
| 49 | "src/**/*_test.cpp", |
| 50 | ]), |
| 51 | deps = [ |
| 52 | "//:marl", |
| 53 | "@googletest//:gtest", |
| 54 | ], |
| 55 | ) |