Skip to content

Commit 2befe02

Browse files
committed
Trying to make bazel cross platform
1 parent 1e25bfd commit 2befe02

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

.bazelrc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +0,0 @@
1-
build --cxxopt='-std=c++17'

BUILD

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
COPTS = select({
2+
"@bazel_tools//src/conditions:windows": ["/std:c++17"],
3+
"//conditions:default": ["--std=c++17"],
4+
})
5+
16
cc_library(
27
name = "soa",
38
hdrs = glob(["vapid/*.h"]),
@@ -7,19 +12,22 @@ cc_library(
712
cc_binary(
813
name = "scratch",
914
srcs = ["scratch.cc"],
10-
deps = [":soa"]
15+
deps = [":soa"],
16+
copts=COPTS
1117
)
1218

1319
cc_binary(
1420
# deprecated in favor of benchmarks below
1521
name = "benchmark",
1622
srcs = ["benchmark.cc", "tictoc.hpp"],
17-
deps = [":soa"]
23+
deps = [":soa"],
24+
copts=COPTS
1825
)
1926

2027
cc_binary(
2128
name = "benchmarks",
2229
srcs = ["benchmarks.cc"],
2330
deps = [":soa",
24-
"@com_github_google_benchmark//:benchmark_main"]
31+
"@com_github_google_benchmark//:benchmark_main"],
32+
copts=COPTS
2533
)

0 commit comments

Comments
 (0)