Moved catch2 library to tests.

This commit is contained in:
Martin Sosic 2018-09-29 10:59:41 +02:00
parent 7620f4c21c
commit 6003d8346f
4 changed files with 14 additions and 11 deletions

View File

@ -1,19 +1,26 @@
cc_library(
name = "catch2",
hdrs = ["catch.hpp"]
)
cc_library(
name = "catch-main",
srcs = ["main.cpp"],
copts = ["-Ivendor/catch2/"],
deps = [
"//vendor/catch2:catch2"
":catch2"
]
)
# TODO: I could use macros to define each test individiually in easy way.
cc_test(
name = "all-tests",
srcs = glob(["**/*.test.cpp"]),
copts = ["-Ivendor/catch2/", "-Isrc/"],
copts = ["-Isrc/"],
deps = [
"catch-main",
"//vendor/catch2:catch2",
"//src:hello-world"
":catch2",
"catch-main",
"//src:hello-world"
]
)

1
stic/vendor/README.md vendored Normal file
View File

@ -0,0 +1 @@
Put external libraries here, if you are tracking them with git.

View File

@ -1,5 +0,0 @@
cc_library(
name = "catch2",
hdrs = ["catch.hpp"],
visibility = ["//test:__pkg__"]
)