aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2015-01-06 10:44:37 -0800
committerGerald Combs <gerald@wireshark.org>2015-01-06 18:47:54 +0000
commita70929c3815a0be735119225d18645da308e51c1 (patch)
tree89aadef4b4aafed9d37416769e84916600154c33 /CMakeLists.txt
parent087fea319aa0a4d3c0b539be2e5e687f8b3e3002 (diff)
CMake: Add an ENABLE_CODE_ANALYSIS option.
Currently Visual Studio-only. Enabling it adds /analyze:WX- to LOCAL_CFLAGS, similar to config.nmake. Change-Id: Ida68831e85f5f04b9f84faa95a39fed24e5f490d Reviewed-on: https://code.wireshark.org/review/6346 Reviewed-by: Gerald Combs <gerald@wireshark.org>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt4
1 files changed, 4 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4c3952382a..e81d2b66c9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -196,6 +196,10 @@ if( CMAKE_C_COMPILER_ID MATCHES "MSVC")
set(LOCAL_CFLAGS ${LOCAL_CFLAGS} "/D_BIND_TO_CURRENT_CRT_VERSION=1")
endif()
+ if(ENABLE_CODE_ANALYSIS)
+ set(LOCAL_CFLAGS ${LOCAL_CFLAGS} "/analyze:WX-")
+ endif()
+
# Additional compiler warnings to be treated as "Level 3"
# when compiling Wireshark sources. (Selected from "level 4" warnings).
## 4295: array is too small to include a terminating null character