Skip to content

Commit

Permalink
today()
Browse files Browse the repository at this point in the history
  • Loading branch information
christoph2 committed Jun 14, 2024
1 parent 27fc779 commit 7af0e85
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
13 changes: 7 additions & 6 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -105,22 +105,23 @@ find_package(ANTLR REQUIRED)

# Call macro to add lexer and grammar to your build dependencies.
antlr_target(pyA2LLexer ./pya2l/a2llg.g4 LEXER
# PACKAGE antlrcpptest
OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/libs/
PACKAGE pya2l_extensions
OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/pya2l/libs/
)

antlr_target(AMLParser ./pya2l/aml.g4 LEXER PARSER LISTENER
# PACKAGE antlrcpptest
PACKAGE pya2l_extensions
VISITOR
OUTPUT_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/libs/
# DEPENDS_ANTLR pyA2LLexer
OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR}/pya2l/libs/
DEPENDS_ANTLR pyA2LLexer
# COMPILE_FLAGS -lib ${ANTLR_AMLParser_OUTPUT_DIR}
)

# include generated files in project environment
include_directories(${ANTLR_pyA2LLexer_OUTPUT_DIR})
include_directories(${ANTLR_AMLParser_OUTPUT_DIR})

message("PROJ " ${PROJECT_SOURCE_DIR})
message("AML-Output: " ${ANTLR_AMLParser_OUTPUT_DIR})


Expand Down Expand Up @@ -152,5 +153,5 @@ ENDIF()
install(TARGETS preprocessor LIBRARY DESTINATION ${CMAKE_CURRENT_SOURCE_DIR}/pya2l)
install(TARGETS a2lparser_ext LIBRARY DESTINATION ${CMAKE_CURRENT_SOURCE_DIR}/pya2l)

install(TARGETS ${Antlr4_GeneratedTargets} LIBRARY DESTINATION ${CMAKE_CURRENT_SOURCE_DIR}/pya2l)
# install(FILES ${ANTLR_AMLParser_OUTPUT_DIR} LIBRARY DESTINATION ${PROJECT_SOURCE_DIR}/libs)
# install(TARGETS AMLParser LIBRARY DESTINATION ${CMAKE_CURRENT_SOURCE_DIR}/pya2l)
2 changes: 2 additions & 0 deletions build_ext.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ def build_extension(debug: bool = False) -> None:
if not build_temp.exists():
build_temp.mkdir(parents=True)

cmake_args += ["-v"]

banner("Step #1: Configure")
print("aufruf:", ["cmake", str(TOP_DIR), *cmake_args])
subprocess.run(["cmake", str(TOP_DIR), *cmake_args], cwd=build_temp, check=True) # nosec
Expand Down
3 changes: 3 additions & 0 deletions pya2l/extensions/utils.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@
#include <string>
#include <vector>

#define PP_UNREFERENCED_PARAMETER(p) ((p) = (p))


enum class State : std::uint8_t {
IDLE,
IN_STRING,
Expand Down

0 comments on commit 7af0e85

Please sign in to comment.