blob: 3d95fe9557fa546de4958b96087c7cbf76d06ff3 [file] [log] [blame]
Nicolas Capens9e5f50f2019-09-20 10:15:53 -04001# 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
15cc_library(
16 name = "marl",
17 srcs = glob(
18 [
19 "src/**/*.cpp",
20 "src/**/*.c",
21 "src/**/*.h",
22 ],
23 exclude = glob([
Ben Claytonec288e22020-02-09 19:20:01 +000024 "src/**/*_bench.cpp",
Nicolas Capens9e5f50f2019-09-20 10:15:53 -040025 "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
46cc_test(
47 name = "tests",
48 srcs = glob([
49 "src/**/*_test.cpp",
50 ]),
51 deps = [
52 "//:marl",
53 "@googletest//:gtest",
54 ],
55)