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

cmake: "-Werror=all -Wno-empty-rule" added for bison

parent d9bbe6c6
......@@ -127,12 +127,15 @@ function(FLEX_BISON_SOURCE TARGET LEXFNAME YFNAME LEXCPP YCPP YHPP)
get_filename_component(LEXFNAME_PATH "${LEXFNAME}" ABSOLUTE)
get_filename_component(YFNAME_PATH "${YFNAME}" ABSOLUTE)
FLEX_TARGET("${LEXCPP}" "${LEXFNAME_PATH}" "${CMAKE_CURRENT_BINARY_DIR}/${LEXCPP}")
set(YFLAGS_BASE "-Werror=all -Wno-empty-rule")
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")
set(YFLAGS "${YFLAGS_BASE} -Wcounterexamples")
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")
set(YFLAGS "${YFLAGS_BASE}")
endif()
FLEX_TARGET("${LEXCPP}" "${LEXFNAME_PATH}" "${CMAKE_CURRENT_BINARY_DIR}/${LEXCPP}")
BISON_TARGET("${YCPP}" "${YFNAME_PATH}" "${CMAKE_CURRENT_BINARY_DIR}/${YCPP}" COMPILE_FLAGS "${YFLAGS}" DEFINES_FILE "${CMAKE_CURRENT_BINARY_DIR}/${YHPP}" VERBOSE REPORT_FILE "${CMAKE_CURRENT_BINARY_DIR}/${YFNAME}.output")
ADD_FLEX_BISON_DEPENDENCY("${LEXCPP}" "${YCPP}")
DEFINE_FLEX_SOURCE("${TARGET}" "${LEXFNAME}" "${LEXCPP}" "${YHPP}")
......
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