Skip to content

Commit

Permalink
feat: generate C++ rules (#87)
Browse files Browse the repository at this point in the history
This adds support to generate the C++ rules for basic proto and gRPC
libraries.
  • Loading branch information
coryan committed Nov 16, 2021
1 parent e5b7dfc commit e23c181
Show file tree
Hide file tree
Showing 5 changed files with 80 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -328,4 +328,19 @@ csharp_gapic_assembly_pkg(
##############################################################################
# C++
##############################################################################
# Put your C++ rules here
load(
"@com_google_googleapis_imports//:imports.bzl",
"cc_grpc_library",
"cc_proto_library",
)

cc_proto_library(
name = "{{name}}_cc_proto",
deps = [":{{name}}_proto"],
)

cc_grpc_library(
name = "{{name}}_cc_grpc",
srcs = [":{{name}}_proto"],
deps = [":{{name}}_cc_proto"],
)
Original file line number Diff line number Diff line change
Expand Up @@ -158,4 +158,19 @@ csharp_grpc_library(
##############################################################################
# C++
##############################################################################
# Put your C++ code here
load(
"@com_google_googleapis_imports//:imports.bzl",
"cc_grpc_library",
"cc_proto_library",
)

cc_proto_library(
name = "{{name}}_cc_proto",
deps = [":{{name}}_proto"],
)

cc_grpc_library(
name = "{{name}}_cc_grpc",
srcs = [":{{name}}_proto"],
deps = [":{{name}}_cc_proto"],
)
Original file line number Diff line number Diff line change
Expand Up @@ -162,4 +162,19 @@ csharp_grpc_library(
##############################################################################
# C++
##############################################################################
# Put your C++ code here
load(
"@com_google_googleapis_imports//:imports.bzl",
"cc_grpc_library",
"cc_proto_library",
)

cc_proto_library(
name = "types_cc_proto",
deps = [":types_proto"],
)

cc_grpc_library(
name = "types_cc_grpc",
srcs = [":types_proto"],
deps = [":types_cc_proto"],
)
Original file line number Diff line number Diff line change
Expand Up @@ -354,4 +354,19 @@ csharp_gapic_assembly_pkg(
##############################################################################
# C++
##############################################################################
# Put your C++ rules here
load(
"@com_google_googleapis_imports//:imports.bzl",
"cc_grpc_library",
"cc_proto_library",
)

cc_proto_library(
name = "library_cc_proto",
deps = [":library_proto"],
)

cc_grpc_library(
name = "library_cc_grpc",
srcs = [":library_proto"],
deps = [":library_cc_proto"],
)
Original file line number Diff line number Diff line change
Expand Up @@ -344,4 +344,19 @@ csharp_gapic_assembly_pkg(
##############################################################################
# C++
##############################################################################
# Put your C++ rules here
load(
"@com_google_googleapis_imports//:imports.bzl",
"cc_grpc_library",
"cc_proto_library",
)

cc_proto_library(
name = "library_cc_proto",
deps = [":library_proto"],
)

cc_grpc_library(
name = "library_cc_grpc",
srcs = [":library_proto"],
deps = [":library_cc_proto"],
)

0 comments on commit e23c181

Please sign in to comment.