fix flex test

This commit is contained in:
Sears Russell 2010-01-11 21:00:46 +00:00
parent d71e248291
commit 67b8808739
3 changed files with 7 additions and 7 deletions

View file

@ -23,6 +23,9 @@ INCLUDE(CTest)
FIND_PACKAGE(FLEX)
FIND_PACKAGE(BISON)
STRING(REGEX MATCH NEW_ENOUGH_FLEX "^flex 2\\.5\\.3" FLEX_VERSION)
FIND_PACKAGE(Doxygen)
if(DOXYGEN_EXECUTABLE)
configure_file(

View file

@ -1,9 +1,11 @@
if(HAVE_GETLINE)
if(BISON_EXECUTABLE)
if(NEW_ENOUGH_FLEX)
SUBDIRS(lang)
ADD_LIBRARY(referential algebra.c dml.c ddl.c tuple.c lang/ast.c)
TARGET_LINK_LIBRARIES(referential ${COMMON_LIBRARIES})
SET(COMMON_LIBRARIES referential refparse ${COMMON_LIBRARIES})
IF(CHECK_LIBRARY)
CREATE_CHECK_OPT(toplevel ${CMAKE_CURRENT_SOURCE_DIR}/test-script.ref)
ENDIF(CHECK_LIBRARY)
endif(NEW_ENOUGH_FLEX)
endif(BISON_EXECUTABLE)
endif(HAVE_GETLINE)

View file

@ -1,6 +1,3 @@
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})
@ -10,5 +7,3 @@ 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)