wireshark/tools/lemon/CMakeLists.txt

47 lines
1.2 KiB
CMake
Raw Permalink Normal View History

# CMakeLists.txt
#
# Wireshark - Network traffic analyzer
# By Gerald Combs <gerald@wireshark.org>
# Copyright 1998 Gerald Combs
#
# SPDX-License-Identifier: GPL-2.0-or-later
#
add_executable(lemon lemon.c)
if(DEFINED LEMON_C_COMPILER)
set(CMAKE_C_COMPILER "${LEMON_C_COMPILER}")
set(CMAKE_C_FLAGS "")
endif()
# To keep lemon.c as close to upstream as possible disable all warnings
if(CMAKE_C_COMPILER_ID MATCHES "MSVC")
target_compile_options(lemon PRIVATE /w)
else()
target_compile_options(lemon PRIVATE -w)
endif()
if(CMAKE_C_COMPILER_ID MATCHES "Clang")
# Disable static analysis for lemon source code. These issues don't
# affect Wireshark at runtime.
target_compile_options(lemon PRIVATE -Xclang -analyzer-disable-all-checks)
endif()
if(DEFINED NO_SANITIZE_CFLAGS)
target_compile_options(lemon PRIVATE ${NO_SANITIZE_CFLAGS})
endif()
if(DEFINED NO_SANITIZE_LDFLAGS)
target_link_options(lemon PRIVATE ${NO_SANITIZE_LDFLAGS})
lemon: sync with upstream (2018-09-08) Changes: - Drop the old basename modification that was present in the Wireshark version of lemon.c. Use a new option available since 2018-04-20 ("Add the -dDIRECTORY command-line option to LEMON.") - Redo the static analyzer warning fixes, identifying the root causes and adding assertions instead of hiding code with __clang_analyzer__. - Ignore compiler warnings instead of adding config.h, _U_, extra const keywords, unsigned/signed changes, etc. - Remove lemon.html, it is out-of-date and external links are available. In order to make future updates easier, document the exact steps that were followed to create the lemon.c and lempar.c files. Future changes SHOULD follow the same process. My process to reach this updated lemon version: 1. Identify previous sync. Found v2.5.2rc0-147-g653af0f6d0 ("lemon: Sync with latest trunk.") which seems based on sqlite commit 2b3d584ffe. 2. Check successive Wireshark patches. Identified many non-functional changes to silence compiler warnings and static analyzer issues. Found one feature (basename) that can be replaced with upstream -d. 3. Write minimal patches and document changes. Upstream typos and coding style issues (other than trailing whitespace) were deliberately not fixed to remain as close as possible to upstream. Change-Id: I606f46dede86e34520f962a9e7163912392aad57 Reviewed-on: https://code.wireshark.org/review/30290 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-10-20 17:29:43 +00:00
endif()
#
lemon: sync with upstream (2018-09-08) Changes: - Drop the old basename modification that was present in the Wireshark version of lemon.c. Use a new option available since 2018-04-20 ("Add the -dDIRECTORY command-line option to LEMON.") - Redo the static analyzer warning fixes, identifying the root causes and adding assertions instead of hiding code with __clang_analyzer__. - Ignore compiler warnings instead of adding config.h, _U_, extra const keywords, unsigned/signed changes, etc. - Remove lemon.html, it is out-of-date and external links are available. In order to make future updates easier, document the exact steps that were followed to create the lemon.c and lempar.c files. Future changes SHOULD follow the same process. My process to reach this updated lemon version: 1. Identify previous sync. Found v2.5.2rc0-147-g653af0f6d0 ("lemon: Sync with latest trunk.") which seems based on sqlite commit 2b3d584ffe. 2. Check successive Wireshark patches. Identified many non-functional changes to silence compiler warnings and static analyzer issues. Found one feature (basename) that can be replaced with upstream -d. 3. Write minimal patches and document changes. Upstream typos and coding style issues (other than trailing whitespace) were deliberately not fixed to remain as close as possible to upstream. Change-Id: I606f46dede86e34520f962a9e7163912392aad57 Reviewed-on: https://code.wireshark.org/review/30290 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot Reviewed-by: Anders Broman <a.broman58@gmail.com>
2018-10-20 17:29:43 +00:00
# Editor modelines - https://www.wireshark.org/tools/modelines.html
#
# Local variables:
# c-basic-offset: 8
# tab-width: 8
# indent-tabs-mode: t
# End:
#
# vi: set shiftwidth=8 tabstop=8 noexpandtab:
# :indentSize=8:tabSize=8:noTabs=false:
#