61 lines
1.8 KiB
Diff
61 lines
1.8 KiB
Diff
--- a/CMakeLists.txt
|
|
+++ b/CMakeLists.txt
|
|
@@ -256,8 +256,9 @@
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_ALLOW_KEYWORD_MACROS=")
|
|
endif()
|
|
endif()
|
|
+find_program(BISON_EXECUTABLE NAMES bison byacc yacc)
|
|
find_package(BISON REQUIRED)
|
|
-if(BISON_VERSION VERSION_LESS 2.7)
|
|
+if(BISON_VERSION AND BISON_VERSION VERSION_LESS 2.7)
|
|
message(SEND_ERROR "Doxygen requires at least bison version 2.7 (installed: ${BISON_VERSION})")
|
|
endif()
|
|
find_package(Threads)
|
|
--- a/deps/libmscgen/CMakeLists.txt
|
|
+++ b/deps/libmscgen/CMakeLists.txt
|
|
@@ -30,6 +30,7 @@
|
|
mscgen_ps_out.c
|
|
mscgen_null_out.c
|
|
${GENERATED_SRC}/mscgen_language.cpp
|
|
+${GENERATED_SRC}/mscgen_language.h
|
|
${GENERATED_SRC}/mscgen_lexer.cpp
|
|
${GENERATED_SRC}/mscgen_lexer.l.h
|
|
mscgen_api.c
|
|
@@ -44,4 +45,5 @@
|
|
BISON_TARGET(mscgen_language
|
|
mscgen_language.y
|
|
${GENERATED_SRC}/mscgen_language.cpp
|
|
+ DEFINES_FILE ${GENERATED_SRC}/mscgen_language.h
|
|
COMPILE_FLAGS "${YACC_FLAGS}")
|
|
--- a/src/CMakeLists.txt
|
|
+++ b/src/CMakeLists.txt
|
|
@@ -182,7 +182,8 @@
|
|
BISON_TARGET(constexp
|
|
${CMAKE_CURRENT_LIST_DIR}/constexp.y
|
|
${GENERATED_SRC}/ce_parse.cpp
|
|
- COMPILE_FLAGS "${YACC_FLAGS}")
|
|
+ DEFINES_FILE ${GENERATED_SRC}/ce_parse.hpp
|
|
+ COMPILE_FLAGS "${YACC_FLAGS} -p constexpYY")
|
|
|
|
if(enable_coverage)
|
|
add_custom_command(
|
|
--- a/src/constexp.y
|
|
+++ b/src/constexp.y
|
|
@@ -22,6 +22,8 @@
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
|
|
+#define YYSTACKDATA constexpYYSTACKDATA
|
|
+
|
|
int constexpYYerror(yyscan_t yyscanner, const char *s)
|
|
{
|
|
struct constexpYY_state* yyextra = constexpYYget_extra(yyscanner);
|
|
@@ -33,7 +35,6 @@
|
|
|
|
%}
|
|
|
|
-%define api.prefix {constexpYY}
|
|
%define api.pure full
|
|
%lex-param {yyscan_t yyscanner}
|
|
%parse-param {yyscan_t yyscanner}
|