diff options
author | albert-github <albert.tests@gmail.com> | 2019-07-20 13:31:30 (GMT) |
---|---|---|
committer | albert-github <albert.tests@gmail.com> | 2019-07-20 13:31:30 (GMT) |
commit | efc67de9d1a4e36ab94164352778fd19f33652b3 (patch) | |
tree | 33a72eec96c4b7470d0f40298e795589b640a186 | |
parent | 242abf259fcd639ebf33162b6f442c80b0fe0043 (diff) | |
download | Doxygen-efc67de9d1a4e36ab94164352778fd19f33652b3.zip Doxygen-efc67de9d1a4e36ab94164352778fd19f33652b3.tar.gz Doxygen-efc67de9d1a4e36ab94164352778fd19f33652b3.tar.bz2 |
Option for 'input buffer overflow'
Cmake option `-Denlarge_lex_buffers=<size>` to enlarge input and read buffers for source code lexers.
-rw-r--r-- | CMakeLists.txt | 2 | ||||
-rw-r--r-- | doc/faq.doc | 7 | ||||
-rw-r--r-- | src/CMakeLists.txt | 2 |
3 files changed, 10 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 7ee9d7e..69ed660 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -26,6 +26,8 @@ option(win_static "Link with /MT in stead of /MD on windows" OFF) option(english_only "Only compile in support for the English language" OFF) option(force_qt4 "Forces doxywizard to build using Qt4 even if Qt5 is installed" OFF) +SET(enlarge_lex_buffers "262144" CACHE INTERNAL "Sets the lex input and read buffere to the specified size") + list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake") set(TOP "${CMAKE_SOURCE_DIR}") include(version) diff --git a/doc/faq.doc b/doc/faq.doc index 88a1275..0ba9450 100644 --- a/doc/faq.doc +++ b/doc/faq.doc @@ -235,6 +235,13 @@ should send me a code fragment that triggers the message. To work around the problem, put some line-breaks into your file, split it up into smaller parts, or exclude it from the input using EXCLUDE. +Another way to work around this problem is to use the cmake command with the option: +``` +-Denlarge_lex_buffers=<size> +``` +where `<size>` is the new size of the input (`YY_BUF_SIZE`) and read (`YY_READ_BUF_SIZE`) buffer. +In case this option is not given the default value of 262144 (i.e. 256K) will be used. + \section faq_latex When running make in the latex directory I get "TeX capacity exceeded". Now what? You can edit the texmf.cfg file to increase the default values of the diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index bc79194..b73dab7 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -16,7 +16,7 @@ file(MAKE_DIRECTORY ${GENERATED_SRC}) file(GLOB LANGUAGE_FILES "${CMAKE_SOURCE_DIR}/src/translator_??.h") # instead of increasebuffer.py -add_definitions(-DYY_BUF_SIZE=262144 -DYY_READ_BUF_SIZE=262144) +add_definitions(-DYY_BUF_SIZE=${enlarge_lex_buffers} -DYY_READ_BUF_SIZE=${enlarge_lex_buffers}) # generate settings.h file(GENERATE OUTPUT ${GENERATED_SRC}/settings.h |