check flex version (fixes compilation under rhel 5)
This commit is contained in:
parent
1af589dd18
commit
078a8619fe
1 changed files with 3 additions and 0 deletions
|
@ -1,4 +1,6 @@
|
|||
if(BISON_EXECUTABLE)
|
||||
STRING(REGEX MATCH NEW_ENOUGH_FLEX "^2\\.5\\.3" FLEX_VERSION)
|
||||
if(NEW_ENOUGH_FLEX)
|
||||
BISON_TARGET(RefParser ${CMAKE_CURRENT_SOURCE_DIR}/parse.y ${CMAKE_CURRENT_BINARY_DIR}/y.tab.c)
|
||||
FLEX_TARGET(RefParser ${CMAKE_CURRENT_SOURCE_DIR}/lexer.l ${CMAKE_CURRENT_BINARY_DIR}/lex.yy.c)
|
||||
#SET(INCLUDE_DIR ${INCLUDE_DIR} ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
@ -8,4 +10,5 @@ ADD_EXECUTABLE(parse_test ${CMAKE_CURRENT_BINARY_DIR}/lex.yy.c ${CMAKE_CURRENT_B
|
|||
SET_TARGET_PROPERTIES(refparse PROPERTIES COMPILE_FLAGS "-Wno-implicit -Wno-unused -I ${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
SET_TARGET_PROPERTIES(parse_test PROPERTIES COMPILE_FLAGS "-Wno-implicit -Wno-unused -I ${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
ADD_TEST(test_parser ${CMAKE_CURRENT_SOURCE_DIR}/test_parser.pl)
|
||||
endif(NEW_ENOUGH_FLEX)
|
||||
endif(BISON_EXECUTABLE)
|
||||
|
|
Loading…
Reference in a new issue