aboutsummaryrefslogtreecommitdiffstats
path: root/build/conf/project_specific/maps/sproto.conf
diff options
context:
space:
mode:
authorrobot-srch-releaser <robot-srch-releaser@yandex-team.com>2023-09-12 21:05:25 +0300
committerrobot-srch-releaser <robot-srch-releaser@yandex-team.com>2023-09-12 21:52:59 +0300
commit780cb95adbe3fda525a69fa319bb44e52c5d89ad (patch)
tree1c4400144ff0946658b2e80da75d416a7fe386f2 /build/conf/project_specific/maps/sproto.conf
parentc8d096252888a36a59d8f192945c4a09e9c6cc88 (diff)
downloadydb-780cb95adbe3fda525a69fa319bb44e52c5d89ad.tar.gz
Rollback: rXXXXXX
[diff-resolver:snermolaev] Sandbox task: https://sandbox.yandex-team.ru/task/1925190358/view Task author: robot-srch-releaser@ Commit was made by robot-srch-releaser@, but committer is deshevoy@ Description: Note: mandatory check (NEED_CHECK) was skipped
Diffstat (limited to 'build/conf/project_specific/maps/sproto.conf')
-rw-r--r--build/conf/project_specific/maps/sproto.conf21
1 files changed, 21 insertions, 0 deletions
diff --git a/build/conf/project_specific/maps/sproto.conf b/build/conf/project_specific/maps/sproto.conf
new file mode 100644
index 0000000000..95234b5f75
--- /dev/null
+++ b/build/conf/project_specific/maps/sproto.conf
@@ -0,0 +1,21 @@
+### @usage: EXPORT_YMAPS_PROTO() # maps-specific
+###
+### Maps-specific .proto handling: IMPORT_YMAPS_PROTO() + maps protobuf namespace.
+macro EXPORT_YMAPS_PROTO() {
+ PROTO_NAMESPACE(maps/doc/proto)
+}
+
+macro _YMAPS_GENERATE_SPROTO_HEADER(File) {
+ .CMD=${cwd;rootdir;input:File} ${tool:"maps/libs/sproto/sprotoc"} -I=./$PROTO_NAMESPACE -I=$ARCADIA_ROOT/$PROTO_NAMESPACE -I=$ARCADIA_BUILD_ROOT -I=$PROTOBUF_PATH --sproto_out=$ARCADIA_BUILD_ROOT/$PROTO_NAMESPACE ${input;rootrel:File} ${output;hide;norel;nopath;noext:File.sproto.h} ${kv;hide:"p PB"} ${kv;hide:"pc yellow"}
+ .PEERDIR=maps/libs/sproto
+}
+
+### @usage: YMAPS_SPROTO(ProtoFiles...) # maps-specific
+###
+### Maps-specific .proto handling: generate .sproto.h files using maps/libs/sproto/sprotoc.
+macro YMAPS_SPROTO(FILES...) {
+ SET(PROTO_HEADER_EXTS .pb.h .sproto.h)
+ foreach (FILE : $FILES) {
+ [.proto]=$_YMAPS_GENERATE_SPROTO_HEADER($FILE)
+ }
+}