ragel: disable unused variable warnings for generated source

This commit is contained in:
Danny Robson 2017-01-27 15:01:41 +11:00
parent d106a052a1
commit e8d23f5865

View File

@ -96,6 +96,16 @@ ${RAGEL_version_error}")
"[RAGEL][${Name}] Compiling state machine with Ragel ${RAGEL_VERSION}" "[RAGEL][${Name}] Compiling state machine with Ragel ${RAGEL_VERSION}"
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}) WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
# Disable some warnings the user may have set which ragel will trigger.
check_cxx_compiler_flag ("-Wno-unused-const-variable" __no_unused_const_variable)
if (__no_unused_const_variable)
set_source_files_properties (
${Output}
PROPERTIES
COMPILE_FLAGS -Wno-unused-const-variable
)
endif()
set(RAGEL_${Name}_DEFINED TRUE) set(RAGEL_${Name}_DEFINED TRUE)
set(RAGEL_${Name}_OUTPUTS ${Output}) set(RAGEL_${Name}_OUTPUTS ${Output})
set(RAGEL_${Name}_INPUT ${Input}) set(RAGEL_${Name}_INPUT ${Input})