Fix conditional compilation for flex / bison

This commit is contained in:
Sears Russell 2008-11-07 08:18:46 +00:00
parent 58d7e12c58
commit 8b0251ae4b

View file

@ -1,3 +1,4 @@
if(BISON_EXECUTABLE)
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})
@ -7,4 +8,4 @@ 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(BISON_EXECUTABLE)