Skip to content

Commit 6eae1f6

Browse files
committed
Improvements to third party packages.
This adds the following new packages: * fmt * ctpl * libpqxx * progress_cpp * subprocess Additionally: * Add a clang++ target to llvm. * Simplify tbb dependency. Signed-off-by: format 20.02.05 <github.com/ChrisCummins/format>
1 parent 7474934 commit 6eae1f6

File tree

9 files changed

+128
-0
lines changed

9 files changed

+128
-0
lines changed

WORKSPACE

+70
Original file line numberDiff line numberDiff line change
@@ -883,3 +883,73 @@ load("@org_tensorflow//tensorflow:workspace.bzl", "tf_repositories")
883883
tf_repositories()
884884

885885
################################################################################
886+
887+
# A modern C++ formatting library.
888+
# https://fmt.dev
889+
890+
http_archive(
891+
name = "fmt",
892+
build_file = "//:third_party/fmt.BUILD",
893+
sha256 = "1cafc80701b746085dddf41bd9193e6d35089e1c6ec1940e037fcb9c98f62365",
894+
strip_prefix = "fmt-6.1.2",
895+
urls = ["https://github.com/fmtlib/fmt/archive/6.1.2.tar.gz"],
896+
)
897+
898+
# Subprocessing with modern C++.
899+
# https://github.com/arun11299/cpp-subprocess.git
900+
901+
http_archive(
902+
name = "subprocess",
903+
build_file = "//:third_party/subprocess.BUILD",
904+
sha256 = "886df0a814a7bb7a3fdeead22f75400abd8d3235b81d05817bc8c1125eeebb8f",
905+
strip_prefix = "cpp-subprocess-2.0",
906+
urls = [
907+
"https://github.com/arun11299/cpp-subprocess/archive/v2.0.tar.gz",
908+
],
909+
)
910+
911+
http_archive(
912+
name = "ctpl",
913+
build_file = "//:third_party/ctpl.BUILD",
914+
sha256 = "8c1cec7c570d6d84be1d29283af5039ea27c3e69703bd446d396424bf619816e",
915+
strip_prefix = "CTPL-ctpl_v.0.0.2",
916+
urls = ["https://github.com/vit-vit/CTPL/archive/ctpl_v.0.0.2.tar.gz"],
917+
)
918+
919+
# Build rules for interfacing with "foreign" (non-Bazel) build systems.
920+
# https://github.com/bazelbuild/rules_foreign_cc
921+
922+
http_archive(
923+
name = "rules_foreign_cc",
924+
sha256 = "450563dc2938f38566a59596bb30a3e905fbbcc35b3fff5a1791b122bc140465",
925+
strip_prefix = "rules_foreign_cc-456425521973736ef346d93d3d6ba07d807047df",
926+
url = "https://github.com/bazelbuild/rules_foreign_cc/archive/456425521973736ef346d93d3d6ba07d807047df.zip",
927+
)
928+
929+
all_content = """filegroup(name = "all", srcs = glob(["**"]), visibility = ["//visibility:public"])"""
930+
931+
load("@rules_foreign_cc//:workspace_definitions.bzl", "rules_foreign_cc_dependencies")
932+
933+
rules_foreign_cc_dependencies([])
934+
935+
# The C++ connector for PostgreSQL.
936+
# https://www.postgresql.org/docs/6.5/libpqplusplus.htm
937+
938+
http_archive(
939+
name = "libpqxx",
940+
build_file_content = all_content,
941+
sha256 = "2280621eee7ec675ed6751abac2273f0ac41395e99be96e06584a54a0cc3985a",
942+
strip_prefix = "libpqxx-6.4.6",
943+
urls = ["https://github.com/jtv/libpqxx/archive/6.4.6.tar.gz"],
944+
)
945+
946+
# A flexible ASCII progress-bar for C++.
947+
# https://github.com/prakhar1989/progress-cpp
948+
949+
http_archive(
950+
name = "progress_cpp",
951+
build_file = "//:third_party/progress_cpp.BUILD",
952+
sha256 = "e5a8804c71a4b86149a00deab62bede041003df7109822805ea8cce015d5373b",
953+
strip_prefix = "progress-cpp-06fdda086eb06b462faff7a917984062bc15b61e",
954+
urls = ["https://github.com/prakhar1989/progress-cpp/archive/06fdda086eb06b462faff7a917984062bc15b61e.tar.gz"],
955+
)

third_party/ctpl.BUILD

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
cc_library(
2+
name = "ctpl",
3+
hdrs = [
4+
"ctpl.h",
5+
"ctpl_stl.h",
6+
],
7+
visibility = ["//visibility:public"],
8+
deps = [
9+
"@boost//:lockfree",
10+
],
11+
)

third_party/fmt.BUILD

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# A modern formatting library. https://fmt.dev
2+
3+
cc_library(
4+
name = "fmt",
5+
srcs = glob(["src/*.cc"]),
6+
hdrs = glob(["include/fmt/*.h"]),
7+
copts = ["-Iexternal/fmt/include"],
8+
strip_include_prefix = "include",
9+
visibility = ["//visibility:public"],
10+
)

third_party/llvm.BUILD

+5
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ filegroup(
99
srcs = ["bin/clang"],
1010
)
1111

12+
filegroup(
13+
name = "clang++",
14+
srcs = ["bin/clang++"],
15+
)
16+
1217
filegroup(
1318
name = "libcxx_headers",
1419
srcs = glob([

third_party/progress_cpp.BUILD

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# A flexible ASCII progress-bar for C++.
2+
# https://github.com/prakhar1989/progress-cpp
3+
4+
licenses(["notice"]) # MIT.
5+
6+
cc_library(
7+
name = "progress_cpp",
8+
hdrs = ["ProgressBar.hpp"],
9+
include_prefix = "progress_cpp",
10+
visibility = ["//visibility:public"],
11+
)

third_party/subprocess.BUILD

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Subprocessing with modern C++.
2+
# https://github.com/arun11299/cpp-subprocess
3+
4+
licenses(["notice"]) # MIT.
5+
6+
cc_library(
7+
name = "subprocess",
8+
hdrs = ["subprocess.hpp"],
9+
include_prefix = "subprocess",
10+
visibility = ["//visibility:public"],
11+
)

third_party/tbb/BUILD

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
cc_library(
2+
name = "tbb",
3+
visibility = ["//visibility:public"],
4+
deps = select({
5+
"//:darwin": ["@tbb_mac//:main"],
6+
"//conditions:default": ["@tbb_lin//:main"],
7+
}),
8+
)

third_party/tbb_lin.BUILD

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ cc_library(
22
name = "main",
33
srcs = glob(["lib/intel64/gcc4.7/libtbb.so*"]),
44
hdrs = glob(["include/**/*.h"]),
5+
includes = ["include"],
56
linkopts = ["-pthread"],
67
visibility = ["//visibility:public"],
78
)

third_party/tbb_mac.BUILD

+1
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,6 @@ cc_library(
22
name = "main",
33
srcs = ["lib/libtbb.dylib"],
44
hdrs = glob(["include/**/*.h"]),
5+
includes = ["include"],
56
visibility = ["//visibility:public"],
67
)

0 commit comments

Comments
 (0)