2009-10-10 05:51:08 +00:00
|
|
|
# CMakeLists.txt
|
|
|
|
#
|
|
|
|
# Wireshark - Network traffic analyzer
|
|
|
|
# By Gerald Combs <gerald@wireshark.org>
|
|
|
|
# Copyright 1998 Gerald Combs
|
|
|
|
#
|
2018-03-06 14:31:02 +00:00
|
|
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
2009-10-10 05:51:08 +00:00
|
|
|
#
|
|
|
|
|
2018-10-21 09:53:19 +00:00
|
|
|
add_executable(lemon lemon.c)
|
|
|
|
|
2021-08-26 14:44:11 +00:00
|
|
|
if(DEFINED LEMON_C_COMPILER)
|
|
|
|
set(CMAKE_C_COMPILER "${LEMON_C_COMPILER}")
|
|
|
|
set(CMAKE_C_FLAGS "")
|
|
|
|
endif()
|
|
|
|
|
2022-12-30 10:36:03 +00:00
|
|
|
# To keep lemon.c as close to upstream as possible disable all warnings
|
2018-10-21 09:53:19 +00:00
|
|
|
if(CMAKE_C_COMPILER_ID MATCHES "MSVC")
|
2022-12-30 10:36:03 +00:00
|
|
|
target_compile_options(lemon PRIVATE /w)
|
2018-10-21 09:53:19 +00:00
|
|
|
else()
|
2022-12-30 10:36:03 +00:00
|
|
|
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})
|
2018-10-20 17:29:43 +00:00
|
|
|
endif()
|
2016-09-30 14:06:15 +00:00
|
|
|
|
|
|
|
#
|
2018-10-20 17:29:43 +00:00
|
|
|
# Editor modelines - https://www.wireshark.org/tools/modelines.html
|
2016-09-30 14:06:15 +00:00
|
|
|
#
|
|
|
|
# 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:
|
|
|
|
#
|