diff options
author | João Valverde <j@v6e.pt> | 2022-12-30 10:36:03 +0000 |
---|---|---|
committer | João Valverde <j@v6e.pt> | 2023-01-01 18:18:06 +0000 |
commit | f2218ae5f0ef259199f624abcd3f57d12894fa5a (patch) | |
tree | dc775c128ded37114124804f38c0433e7a9d835a /cmake/modules/UseLemon.cmake | |
parent | 67a788b29c2916234e034e6b2a80b1bbe7feac45 (diff) |
Lemon: Update code and remove cruft
Remove some unused historical files.
Aggressively disable warnings to keep the lemon source
pristine and avoid the maintenance burden for lemon itself.
Lemon has its own lax policy for warnings that doesn't match our
own and they won't accept external patches to remove the
warnings, so just ignore them. Lemon is just executed to generate
code for the Wireshark build and the minor code issues it has
have no influence at runtime.
For lemon generated code we selectively disable some linting
warnings.
Remove patches for lemon and lempar, they are no longer required
with these changes to silence warnings.
Diffstat (limited to 'cmake/modules/UseLemon.cmake')
-rw-r--r-- | cmake/modules/UseLemon.cmake | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/cmake/modules/UseLemon.cmake b/cmake/modules/UseLemon.cmake index 28c4982931..056d9f9c5d 100644 --- a/cmake/modules/UseLemon.cmake +++ b/cmake/modules/UseLemon.cmake @@ -25,5 +25,12 @@ MACRO(ADD_LEMON_FILES _source _generated) LIST(APPEND ${_source} ${_in}) LIST(APPEND ${_generated} ${_out}.c) - ENDFOREACH (_current_FILE) + if(CMAKE_C_COMPILER_ID MATCHES "MSVC") + set_source_files_properties(${_out}.c PROPERTIES COMPILE_OPTIONS "/w") + elseif(CMAKE_C_COMPILER_ID MATCHES "GNU|Clang") + set_source_files_properties(${_out}.c PROPERTIES COMPILE_OPTIONS "-Wno-unused-parameter") + else() + # Build with some warnings for lemon generated code + endif() + ENDFOREACH (_current_FILE) ENDMACRO(ADD_LEMON_FILES) |