summaryrefslogtreecommitdiffstats
path: root/vhdlparser/CMakeLists.txt
diff options
context:
space:
mode:
authoralbert-github <albert.tests@gmail.com>2020-06-10 19:44:36 (GMT)
committerGitHub <noreply@github.com>2020-06-10 19:44:36 (GMT)
commitcb5a9c3f31b0233a5dc72d13f9f4cfa7db5fe00c (patch)
tree3bdd2001867037e0f932ef37b6660b950e8542b8 /vhdlparser/CMakeLists.txt
parentd25ced506bdaa35553f114e1d71e173c95a792c0 (diff)
downloadDoxygen-cb5a9c3f31b0233a5dc72d13f9f4cfa7db5fe00c.zip
Doxygen-cb5a9c3f31b0233a5dc72d13f9f4cfa7db5fe00c.tar.gz
Doxygen-cb5a9c3f31b0233a5dc72d13f9f4cfa7db5fe00c.tar.bz2
issue #7778 Build fails with javacc 5.0 (#7779)
* issue #7778 Build fails with javacc 5.0 At the moment doxygen works with javaCC version 7.0.5 but no test is done for the version. The minimum requirement has been set to 7.0.5 javacc does not have an option to retrieve the version though when giving `--version` a bit more information is given, this information is filtered. (an issue has been submitted to javacc to obtain the version information: https://github.com/javacc/javacc/issues/172). * issue #7778 Build fails with javacc 5.0 Version detection did not work for `5.0` (only x.y.z was handled, not x.y) * issue #7778 Build fails with javacc 5.0 Based on a review - `--version` is not a valid option, but present already for future use but - removed double ` if(JAVACC_EXECUTABLE)` - Needed `"${JAVACC_TEMP_VERSION}"` as otherwise when `javacc` is found but cannot be executed a message like: ``` CMake Error at cmake/FindJavacc.cmake:11 (string): string sub-command REGEX, mode MATCH needs at least 5 arguments total to command. Call Stack (most recent call first): vhdlparser/CMakeLists.txt:1 (find_package) ``` would appear - reformulated some status strings * issue #7778 Build fails with javacc 5.0 the `.` was not correctly escaped. * issue #7778 Build fails with javacc 5.0 Another one 7.0........ match, going for the suggested match in the cmake CheckCXXCompilerFlag * issue #7778 Build fails with javacc 5.0 Accidently left debug statement. * issue #7778 Build fails with javacc 5.0 Problem has been fixed upstream for version 7.0.7 and up, not using `--version` but `-version` as all command line arguments are starting with a single '-'. Also it is just the bare version, so small extra test so it will work with all versions.
Diffstat (limited to 'vhdlparser/CMakeLists.txt')
-rw-r--r--vhdlparser/CMakeLists.txt6
1 files changed, 6 insertions, 0 deletions
diff --git a/vhdlparser/CMakeLists.txt b/vhdlparser/CMakeLists.txt
index 3e52817..343f126 100644
--- a/vhdlparser/CMakeLists.txt
+++ b/vhdlparser/CMakeLists.txt
@@ -1,11 +1,17 @@
find_package(Javacc)
if (JAVACC_FOUND)
+ if (JAVACC_VERSION VERSION_LESS 7.0.5)
+ message(STATUS " Doxygen requires at least JavaCC version 7.0.5 (installed: ${JAVACC_VERSION})")
+ message(STATUS " Fall back to JavaCC not installed, using existing files.")
+ else()
+
add_custom_command(
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/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
)
+ endif()
endif()
include_directories(${CMAKE_SOURCE_DIR}/src ${CMAKE_SOURCE_DIR}/qtools ${GENERATED_SRC})