ya.make 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. LIBRARY()
  2. PEERDIR (
  3. yql/essentials/parser/proto_ast/gen/v0_proto_split
  4. yql/essentials/parser/proto_ast/antlr3
  5. )
  6. SET(antlr_output ${ARCADIA_BUILD_ROOT}/${MODDIR})
  7. SET(antlr_templates ${antlr_output}/org/antlr/codegen/templates)
  8. SET(sql_grammar ${ARCADIA_ROOT}/yql/essentials/sql/v0/SQL.g)
  9. SET(ANTLR_PACKAGE_NAME NSQLGenerated)
  10. SET(PROTOBUF_HEADER_PATH yql/essentials/parser/proto_ast/gen/v0_proto_split)
  11. SET(PROTOBUF_SUFFIX_PATH .pb.main.h)
  12. SET(LEXER_PARSER_NAMESPACE NALP)
  13. CONFIGURE_FILE(${ARCADIA_ROOT}/yql/essentials/parser/proto_ast/org/antlr/codegen/templates/Cpp/Cpp.stg.in ${antlr_templates}/Cpp/Cpp.stg)
  14. NO_COMPILER_WARNINGS()
  15. INCLUDE(${ARCADIA_ROOT}/yql/essentials/parser/proto_ast/org/antlr/codegen/templates/ya.make.incl)
  16. ADDINCL(
  17. GLOBAL contrib/libs/antlr4_cpp_runtime/src
  18. )
  19. RUN_ANTLR(
  20. ${sql_grammar}
  21. -lib .
  22. -fo ${antlr_output}
  23. IN ${sql_grammar} ${antlr_templates}/Cpp/Cpp.stg
  24. OUT SQLParser.cpp SQLLexer.cpp SQLParser.h SQLLexer.h
  25. OUTPUT_INCLUDES
  26. ${PROTOBUF_HEADER_PATH}/SQLParser.pb.main.h
  27. ${STG_INCLUDES}
  28. CWD ${antlr_output}
  29. )
  30. END()