From fe233524d5637944e66d08a3f1bed05e14107956 Mon Sep 17 00:00:00 2001 From: albert-github Date: Thu, 12 Dec 2019 13:27:46 +0100 Subject: Adding JAVACC_FLAGS for javacc compilation During transition to cmake build the, essential for debugging, flag possibility was not added. (Added analogous to LEX_FLAGS and YACC_Flags). Available debug options (according to old Makefile): `-debug_parser` `-debug_token_manager` `-debug_lookahead` --- CMakeLists.txt | 2 ++ vhdlparser/CMakeLists.txt | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2644ceb..8ab5aa7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -82,9 +82,11 @@ set(CMAKE_VISIBILITY_INLINES_HIDDEN 1) if (CMAKE_GENERATOR MATCHES "Ninja") set(LEX_FLAGS ) set(YACC_FLAGS ) + set(JAVACC_FLAGS ) else () set(LEX_FLAGS $(LEX_FLAGS)) set(YACC_FLAGS $(YACC_FLAGS)) + set(JAVACC_FLAGS $(JAVACC_FLAGS)) endif () find_program(DOT NAMES dot) diff --git a/vhdlparser/CMakeLists.txt b/vhdlparser/CMakeLists.txt index ad5af28..43dc74d 100644 --- a/vhdlparser/CMakeLists.txt +++ b/vhdlparser/CMakeLists.txt @@ -1,7 +1,7 @@ find_package(Javacc) if (JAVACC_FOUND) add_custom_command( - COMMAND ${JAVACC_EXECUTABLE} -OUTPUT_DIRECTORY=${CMAKE_SOURCE_DIR}/vhdlparser ${CMAKE_SOURCE_DIR}/vhdlparser/vhdlparser.jj + COMMAND ${JAVACC_EXECUTABLE} ${JAVACC_FLAGS} -OUTPUT_DIRECTORY=${CMAKE_SOURCE_DIR}/vhdlparser ${CMAKE_SOURCE_DIR}/vhdlparser/vhdlparser.jj DEPENDS ${CMAKE_SOURCE_DIR}/vhdlparser/vhdlparser.jj OUTPUT ${CMAKE_SOURCE_DIR}/vhdlparser/CharStream.cc ${CMAKE_SOURCE_DIR}/vhdlparser/CharStream.h ${CMAKE_SOURCE_DIR}/vhdlparser/ErrorHandler.h ${CMAKE_SOURCE_DIR}/vhdlparser/JavaCC.h ${CMAKE_SOURCE_DIR}/vhdlparser/ParseException.cc ${CMAKE_SOURCE_DIR}/vhdlparser/ParseException.h ${CMAKE_SOURCE_DIR}/vhdlparser/Token.cc ${CMAKE_SOURCE_DIR}/vhdlparser/Token.h ${CMAKE_SOURCE_DIR}/vhdlparser/TokenManager.h ${CMAKE_SOURCE_DIR}/vhdlparser/TokenMgrError.cc ${CMAKE_SOURCE_DIR}/vhdlparser/TokenMgrError.h ${CMAKE_SOURCE_DIR}/vhdlparser/VhdlParser.cc ${CMAKE_SOURCE_DIR}/vhdlparser/VhdlParser.h ${CMAKE_SOURCE_DIR}/vhdlparser/VhdlParserConstants.h ${CMAKE_SOURCE_DIR}/vhdlparser/VhdlParserTokenManager.cc ${CMAKE_SOURCE_DIR}/vhdlparser/VhdlParserTokenManager.h ) -- cgit v0.12