diff --git a/FindRAGEL.cmake b/FindRAGEL.cmake index d778791..5e2d297 100644 --- a/FindRAGEL.cmake +++ b/FindRAGEL.cmake @@ -96,6 +96,16 @@ ${RAGEL_version_error}") "[RAGEL][${Name}] Compiling state machine with Ragel ${RAGEL_VERSION}" 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}_OUTPUTS ${Output}) set(RAGEL_${Name}_INPUT ${Input})