Commit ea3adb48 authored by Kevin Funk's avatar Kevin Funk
Browse files

Don't cause unnecessary call of bison

This approach fixes this for CMake versions >=3.4.0
parent da8d4a12
......@@ -10,10 +10,15 @@ flex_target(surveytargetexpressionscanner
${CMAKE_CURRENT_BINARY_DIR}/surveytargetexpressionlexer.cpp
COMPILE_FLAGS --header-file=${CMAKE_CURRENT_BINARY_DIR}/surveytargetexpressionscanner.h
)
if (CMAKE_VERSION VERSION_GREATER 3.4.0)
set(_bison_opts DEFINES_FILE ${CMAKE_CURRENT_BINARY_DIR}/surveytargetexpressionparser_p.h)
else()
set(_bison_opts COMPILE_FLAGS --defines=${CMAKE_CURRENT_BINARY_DIR}/surveytargetexpressionparser_p.h)
endif()
bison_target(surveytargetexpressionparser
surveytargetexpressionparser.y
${CMAKE_CURRENT_BINARY_DIR}/surveytargetexpressionparser_p.cpp
COMPILE_FLAGS --defines=${CMAKE_CURRENT_BINARY_DIR}/surveytargetexpressionparser_p.h
${_bison_opts}
)
add_flex_bison_dependency(surveytargetexpressionscanner surveytargetexpressionparser)
endif()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment