Commit 1af3348e authored by Bednárek David RNDr. Ph.D.'s avatar Bednárek David RNDr. Ph.D.
Browse files

Generate counterexamples for conflicts (if bison version is at least 3.7.0)

parent b1ed4ed2
......@@ -115,7 +115,11 @@ function(FLEX_BISON_SOURCE TARGET LEXFNAME YFNAME LEXCPP YCPP YHPP)
get_filename_component(YFNAME_PATH "${YFNAME}" ABSOLUTE)
FLEX_TARGET("${LEXCPP}" "${LEXFNAME_PATH}" "${CMAKE_CURRENT_BINARY_DIR}/${LEXCPP}")
BISON_TARGET("${YCPP}" "${YFNAME_PATH}" "${CMAKE_CURRENT_BINARY_DIR}/${YCPP}" DEFINES_FILE "${CMAKE_CURRENT_BINARY_DIR}/${YHPP}" VERBOSE REPORT_FILE "${CMAKE_CURRENT_BINARY_DIR}/${YFNAME}.output")
if("${BISON_VERSION}" VERSION_GREATER_EQUAL "3.7.0")
BISON_TARGET("${YCPP}" "${YFNAME_PATH}" "${CMAKE_CURRENT_BINARY_DIR}/${YCPP}" COMPILE_FLAGS "-Wcounterexamples" DEFINES_FILE "${CMAKE_CURRENT_BINARY_DIR}/${YHPP}" VERBOSE REPORT_FILE "${CMAKE_CURRENT_BINARY_DIR}/${YFNAME}.output")
else()
BISON_TARGET("${YCPP}" "${YFNAME_PATH}" "${CMAKE_CURRENT_BINARY_DIR}/${YCPP}" DEFINES_FILE "${CMAKE_CURRENT_BINARY_DIR}/${YHPP}" VERBOSE REPORT_FILE "${CMAKE_CURRENT_BINARY_DIR}/${YFNAME}.output")
endif()
ADD_FLEX_BISON_DEPENDENCY("${LEXCPP}" "${YCPP}")
DEFINE_FLEX_SOURCE("${TARGET}" "${LEXFNAME}" "${LEXCPP}" "${YHPP}")
......
Supports Markdown
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