Skip to content

Commit

Permalink
Export by new cmake generator (#9216)
Browse files Browse the repository at this point in the history
Co-authored-by: Dmitrii Dmitriev <40385868+dimdim1177@users.noreply.github.com>
  • Loading branch information
alexv-smirnov and dimdim1177 authored Sep 13, 2024
1 parent 2416150 commit 6ee3d1c
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 5 deletions.
2 changes: 1 addition & 1 deletion generate_cmake
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ if __name__ == "__main__":
--semantic-graph \"{ydb_metadata_folder_path + '/sem.linux-aarch64.json'}\" --platforms linux-aarch64 \
--semantic-graph \"{ydb_metadata_folder_path + '/sem.darwin-x86_64.json'}\" --platforms darwin-x86_64 \
--semantic-graph \"{ydb_metadata_folder_path + '/sem.darwin-arm64.json'}\" --platforms darwin-arm64 \
--semantic-graph \"{ydb_metadata_folder_path + '/sem.windows-x86_64.json'}\" --platforms windows-x86_64"
--semantic-graph \"{ydb_metadata_folder_path + '/sem.windows-x86_64.json'}\" --platforms windows-x86_64 --generator cmake"
# yexport_command = f"{yexport_binary_path} --export-root \"{ydb_tmp_folder_path}\" --target YDB \
# --semantic-graph \"{ydb_metadata_folder_path + '/sem.darwin-x86_64.json'}\" --platforms darwin-x86_64"
print(f"yexport command {yexport_command}")
Expand Down
6 changes: 3 additions & 3 deletions ydb/library/yql/parser/proto_ast/gen/jsonpath/ya.make
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
PROTO_LIBRARY()

IF (CPP_PROTO)
IF (GEN_PROTO)
SET(antlr_output ${ARCADIA_BUILD_ROOT}/${MODDIR})
SET(antlr_templates ${antlr_output}/org/antlr/codegen/templates)
SET(jsonpath_grammar ${ARCADIA_ROOT}/ydb/library/yql/minikql/jsonpath/JsonPath.g)
Expand All @@ -23,11 +23,10 @@ IF (CPP_PROTO)
CWD ${antlr_output}
)

EXCLUDE_TAGS(GO_PROTO JAVA_PROTO)

NO_COMPILER_WARNINGS()

ADDINCL(
# TODO Please check RUN_ANTLR with version 3, but ADDINCL for version 4
GLOBAL contrib/libs/antlr4_cpp_runtime/src
)

Expand All @@ -48,5 +47,6 @@ ENDIF()

SRCS(JsonPathParser.proto)

EXCLUDE_TAGS(GO_PROTO JAVA_PROTO)

END()
9 changes: 9 additions & 0 deletions ydb/library/yql/parser/proto_ast/gen/v0/epilogue.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
set(GRAMMAR_STRING_CORE_SINGLE "~(QUOTE_SINGLE | BACKSLASH) | (BACKSLASH .)")
set(GRAMMAR_STRING_CORE_DOUBLE "~(QUOTE_DOUBLE | BACKSLASH) | (BACKSLASH .)")
set(GRAMMAR_MULTILINE_COMMENT_CORE ".")
configure_file(
${CMAKE_SOURCE_DIR}/ydb/library/yql/sql/v0/SQL.g
${CMAKE_BINARY_DIR}/ydb/library/yql/parser/proto_ast/gen/v0/SQL.g
)


Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
set(GRAMMAR_STRING_CORE_SINGLE "~(QUOTE_SINGLE | BACKSLASH) | (BACKSLASH .)")
set(GRAMMAR_STRING_CORE_DOUBLE "~(QUOTE_DOUBLE | BACKSLASH) | (BACKSLASH .)")
set(GRAMMAR_MULTILINE_COMMENT_CORE ".")

configure_file(
${CMAKE_SOURCE_DIR}/ydb/library/yql/sql/v0/SQL.g
${CMAKE_BINARY_DIR}/ydb/library/yql/parser/proto_ast/gen/v0_proto_split/SQL.g
)

7 changes: 6 additions & 1 deletion ydb/ya.make
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@ RECURSE(
mvp
public
services
tests
tools
yql_docs
)

IF(NOT EXPORT_CMAKE)
RECURSE(
tests
)
ENDIF()

0 comments on commit 6ee3d1c

Please sign in to comment.