Suppress MSVC warning due to lemon

This commit is contained in:
Marek Roszko 2022-08-18 20:48:14 -04:00
parent b9461f2ba7
commit 238356ec61
1 changed files with 5 additions and 0 deletions

View File

@ -92,6 +92,11 @@ function( generate_lemon_grammar TGT GRAMMAR_DIR CONSUMING_FILE GRAMMAR_FILE )
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/${GRAMMAR_DIR}
)
if(MSVC)
# lemon has a habit of generating empty switch cases which we can ignore
set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/${CONSUMING_FILE} PROPERTIES COMPILE_FLAGS /wd4065)
endif()
# Mark the consuming file with a direct dependency on the generated grammar so that
# it isn't compiled until the grammar is generated
set_source_files_properties(