cmake: Add option to disable -Wframe-larger-than

In some editors (like Xcode) it's possible to turn on and off
ASAN and UBSAN independent of the settings in CMake.

This option will disable the -Wframe-larger-than= flag even if
ASAN or UBSAN are not turned on in CMake.

Change-Id: I70b1ae544fe87093d0f5ce7ceb191f33399191ea
Reviewed-on: https://code.wireshark.org/review/23567
Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org>
Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
This commit is contained in:
Stig Bjørlykke 2017-09-16 12:47:30 +02:00
parent 66d39cc60b
commit 17651065a5
2 changed files with 2 additions and 1 deletions

View File

@ -479,7 +479,7 @@ else()
#
# Code that may be worth looking into (coding practices)
#
if((NOT ENABLE_ASAN) AND (NOT ENABLE_UBSAN))
if((NOT ENABLE_ASAN) AND (NOT ENABLE_UBSAN) AND (NOT DISABLE_FRAME_LARGER_THAN_WARNING))
#
# Only do this if neither ASan nor UBSan are
# enabled; the instrumentation they add increases

View File

@ -25,6 +25,7 @@ option(BUILD_udpdump "Build udpdump" ON)
option(BUILD_sharkd "Build sharkd" ON)
option(DISABLE_WERROR "Do not treat warnings as errors" OFF)
option(DISABLE_FRAME_LARGER_THAN_WARNING "Disable warning if the size of a function frame is large" OFF)
option(EXTCAP_ANDROIDDUMP_LIBPCAP "Build androiddump using libpcap" OFF)
option(ENABLE_EXTRA_COMPILER_WARNINGS "Do additional compiler warnings (disables -Werror)" OFF)
option(ENABLE_CODE_ANALYSIS "Enable the compiler's static analyzer if possible" OFF)