Skip to content

Commit

Permalink
[CLDAPPS-896] C++ Asio and Asio-Grpc header only libraries (#127)
Browse files Browse the repository at this point in the history
# Changes

Introduces the [Asio C++ library](https://think-async.com/Asio/) and the
[Asio gRPC](https://github.com/Tradias/asio-grpc) library to our bazel
third party libraries, both are header only libraries, which makes
things really easy to setup.

# Related PR

Similar implementation with cmake
swift-nav/cmake#170
  • Loading branch information
RReichert authored Jan 4, 2024
1 parent 030c1c5 commit d10814e
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 0 deletions.
20 changes: 20 additions & 0 deletions third_party/asio-grpc.BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Copyright (C) 2023 Swift Navigation Inc.
# Contact: Swift Navigation <[email protected]>
#
# This source is subject to the license found in the file 'LICENSE' which must
# be be distributed together with this source. All other rights reserved.
#
# THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
# EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
# WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.

package(
default_visibility = ["//visibility:public"],
)

cc_library(
name = "asio-grpc",
hdrs = glob(["src/agrpc/**"]),
defines = ["AGRPC_STANDALONE_ASIO"],
includes = ["src"],
)
22 changes: 22 additions & 0 deletions third_party/asio.BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Copyright (C) 2023 Swift Navigation Inc.
# Contact: Swift Navigation <[email protected]>
#
# This source is subject to the license found in the file 'LICENSE' which must
# be be distributed together with this source. All other rights reserved.
#
# THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
# EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED
# WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.

package(
default_visibility = ["//visibility:public"],
)

cc_library(
name = "asio",
hdrs = glob([
"asio/include/asio.hpp",
"asio/include/asio/**",
]),
includes = ["asio/include"],
)

0 comments on commit d10814e

Please sign in to comment.