From cd7c47e6389d7641e65bef8215f2c101a9977465 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Sun, 6 Aug 2017 15:49:13 -0700 Subject: [PATCH] Fix setting COMMON_WARN_FLAGS. If we want to add -Wframe-larger-than=16384, *append* it, don't *overwrite* it. Indent that code properly while we're at it. Change-Id: Iae8894e6663500620a07589fd6ba3d00f9eac7ba Reviewed-on: https://code.wireshark.org/review/22977 Reviewed-by: Guy Harris --- CMakeLists.txt | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 76c5a23c25..602193fd59 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -451,14 +451,15 @@ else() -Wno-long-long -Wheader-guard ) -if((NOT ENABLE_ASAN) AND (NOT ENABLE_UBSAN)) - # - # Code that may be worth looking into (coding practices) - # - set(COMMON_WARN_FLAGS - -Wframe-larger-than=16384 - ) -endif() + + if((NOT ENABLE_ASAN) AND (NOT ENABLE_UBSAN)) + # + # Code that may be worth looking into (coding practices) + # + set(COMMON_WARN_FLAGS ${COMMON_WARN_FLAGS} + -Wframe-larger-than=16384 + ) + endif() set(C_WARN_FLAGS # The following are C only, not C++