Skip to content

Commit d397bfd

Browse files
Add boost.timer version 1.83.0.bcr.1 (#6538)
Following strcuture added in #4058 without using symlink for MODULE.bazel (#6440). Adjusted according to other `boost.*` 1.83.0.bcr.1 targets: - `presubmit.yml` matrix.platform list and matrix.bazel - Dependencies: - `platforms` using version 0.0.10 - `rules_cc` using version 0.0.14 Adding @bazel-io skip_check unstable_url as it doesn't have a stable url.
1 parent 23ff8d9 commit d397bfd

File tree

6 files changed

+138
-0
lines changed

6 files changed

+138
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
module(
2+
name = "boost.timer",
3+
version = "1.83.0.bcr.1",
4+
bazel_compatibility = [">=7.2.1"], # need support for "overlay" directory
5+
compatibility_level = 108300,
6+
)
7+
8+
bazel_dep(name = "boost.config", version = "1.83.0.bcr.1")
9+
bazel_dep(name = "boost.io", version = "1.83.0.bcr.1")
10+
bazel_dep(name = "boost.predef", version = "1.83.0.bcr.1")
11+
bazel_dep(name = "platforms", version = "0.0.10")
12+
bazel_dep(name = "rules_cc", version = "0.0.15")
13+
14+
# For tests
15+
bazel_dep(name = "boost.chrono", version = "1.83.0.bcr.1")
16+
bazel_dep(name = "boost.core", version = "1.83.0.bcr.1")
17+
bazel_dep(name = "boost.detail", version = "1.83.0.bcr.1")
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
load("@rules_cc//cc:defs.bzl", "cc_library", "cc_test")
2+
3+
cc_library(
4+
name = "boost.timer",
5+
srcs = glob(["src/*.cpp"]),
6+
hdrs = glob(
7+
["include/**/*.hpp"],
8+
# These headers are deprecated and should not be used.
9+
exclude = [
10+
"include/boost/progress.hpp",
11+
"include/boost/timer.hpp",
12+
],
13+
),
14+
features = ["parse_headers"],
15+
includes = ["include"],
16+
visibility = ["//visibility:public"],
17+
deps = [
18+
"@boost.config",
19+
"@boost.io",
20+
"@boost.predef",
21+
],
22+
)
23+
24+
cc_test(
25+
name = "chrono_conflict_test",
26+
srcs = ["test/chrono_conflict_test.cpp"],
27+
deps = [
28+
":boost.timer",
29+
"@boost.chrono",
30+
],
31+
target_compatible_with = select({
32+
"@platforms//os:macos": ["@platforms//:incompatible"],
33+
"//conditions:default": [],
34+
}),
35+
)
36+
37+
cc_test(
38+
name = "cpu_timer_info_test",
39+
srcs = ["test/cpu_timer_info.cpp"],
40+
local_defines = select({
41+
"@platforms//os:windows": ["BOOST_ALL_NO_LIB"],
42+
"//conditions:default": [],
43+
}),
44+
deps = [
45+
":boost.timer",
46+
"@boost.detail",
47+
],
48+
)
49+
50+
cc_test(
51+
name = "cpu_timer_test",
52+
srcs = ["test/cpu_timer_test.cpp"],
53+
local_defines = select({
54+
"@platforms//os:windows": ["BOOST_ALL_NO_LIB"],
55+
"//conditions:default": [],
56+
}),
57+
deps = [
58+
":boost.timer",
59+
"@boost.detail",
60+
],
61+
)
62+
63+
cc_test(
64+
name = "progress_display_test",
65+
srcs = ["test/progress_display_test.cpp"],
66+
deps = [
67+
":boost.timer",
68+
"@boost.core",
69+
],
70+
)
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
module(
2+
name = "boost.timer",
3+
version = "1.83.0.bcr.1",
4+
bazel_compatibility = [">=7.2.1"], # need support for "overlay" directory
5+
compatibility_level = 108300,
6+
)
7+
8+
bazel_dep(name = "boost.config", version = "1.83.0.bcr.1")
9+
bazel_dep(name = "boost.io", version = "1.83.0.bcr.1")
10+
bazel_dep(name = "boost.predef", version = "1.83.0.bcr.1")
11+
bazel_dep(name = "platforms", version = "0.0.10")
12+
bazel_dep(name = "rules_cc", version = "0.0.15")
13+
14+
# For tests
15+
bazel_dep(name = "boost.chrono", version = "1.83.0.bcr.1")
16+
bazel_dep(name = "boost.core", version = "1.83.0.bcr.1")
17+
bazel_dep(name = "boost.detail", version = "1.83.0.bcr.1")
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
matrix:
2+
platform:
3+
- debian10
4+
- debian11
5+
- ubuntu2004
6+
- ubuntu2204
7+
- ubuntu2404
8+
- macos
9+
- macos_arm64
10+
- windows
11+
bazel: [7.x]
12+
tasks:
13+
verify_targets:
14+
platform: ${{ platform }}
15+
bazel: ${{ bazel }}
16+
build_flags:
17+
- "--process_headers_in_dependencies"
18+
build_targets:
19+
- "@boost.timer"
20+
test_flags:
21+
- "--process_headers_in_dependencies"
22+
test_targets:
23+
- "@boost.timer//:all"
24+
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"url": "https://github.com/boostorg/timer/archive/refs/tags/boost-1.83.0.tar.gz",
3+
"integrity": "sha256-CGzESZRhRsrUlZCiwYSbcpJehk2qMWt7dHvEvgeFht8=",
4+
"strip_prefix": "timer-boost-1.83.0",
5+
"overlay": {
6+
"BUILD.bazel": "sha256-jnRjnByNNvvlGGkeuH8KLdcNfLZDyK0UdPpXYHfgdSk=",
7+
"MODULE.bazel": "sha256-JbMp2oE6bqQfckU6H+94NbJTtrDWyvMVcLtV6mPrPik="
8+
}
9+
}

modules/boost.timer/metadata.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
"github:boostorg/timer"
1919
],
2020
"versions": [
21+
"1.83.0.bcr.1",
2122
"1.87.0",
2223
"1.88.0.bcr.1",
2324
"1.88.0.bcr.2",

0 commit comments

Comments
 (0)