ya.make 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. PROTO_LIBRARY()
  2. IF (GEN_PROTO)
  3. SET(antlr_output ${ARCADIA_BUILD_ROOT}/${MODDIR})
  4. SET(antlr_templates ${antlr_output}/org/antlr/codegen/templates)
  5. SET(jsonpath_grammar ${ARCADIA_ROOT}/yql/essentials/minikql/jsonpath/JsonPath.g)
  6. SET(ANTLR_PACKAGE_NAME NJsonPathGenerated)
  7. SET(PROTOBUF_HEADER_PATH ${MODDIR})
  8. SET(PROTOBUF_SUFFIX_PATH .pb.h)
  9. SET(LEXER_PARSER_NAMESPACE NALP)
  10. CONFIGURE_FILE(${ARCADIA_ROOT}/yql/essentials/parser/proto_ast/org/antlr/codegen/templates/Cpp/Cpp.stg.in ${antlr_templates}/Cpp/Cpp.stg)
  11. CONFIGURE_FILE(${ARCADIA_ROOT}/yql/essentials/parser/proto_ast/org/antlr/codegen/templates/protobuf/protobuf.stg.in ${antlr_templates}/protobuf/protobuf.stg)
  12. RUN_ANTLR(
  13. ${jsonpath_grammar}
  14. -lib .
  15. -fo ${antlr_output}
  16. -language protobuf
  17. IN ${jsonpath_grammar} ${antlr_templates}/protobuf/protobuf.stg
  18. OUT_NOAUTO JsonPathParser.proto
  19. CWD ${antlr_output}
  20. )
  21. NO_COMPILER_WARNINGS()
  22. ADDINCL(
  23. # TODO Please check RUN_ANTLR with version 3, but ADDINCL for version 4
  24. GLOBAL contrib/libs/antlr4_cpp_runtime/src
  25. )
  26. INCLUDE(${ARCADIA_ROOT}/yql/essentials/parser/proto_ast/org/antlr/codegen/templates/ya.make.incl)
  27. RUN_ANTLR(
  28. ${jsonpath_grammar}
  29. -lib .
  30. -fo ${antlr_output}
  31. IN ${jsonpath_grammar} ${antlr_templates}/Cpp/Cpp.stg
  32. OUT JsonPathParser.cpp JsonPathLexer.cpp JsonPathParser.h JsonPathLexer.h
  33. OUTPUT_INCLUDES
  34. JsonPathParser.pb.h
  35. ${STG_INCLUDES}
  36. CWD ${antlr_output}
  37. )
  38. ENDIF()
  39. SRCS(JsonPathParser.proto)
  40. EXCLUDE_TAGS(GO_PROTO JAVA_PROTO)
  41. END()