aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2021-02-16 11:03:35 -0800
committerGerald Combs <gerald@wireshark.org>2021-02-16 11:04:35 -0800
commitfa15eb8f5ddb57522a23f029fa50172c041cdf41 (patch)
treed3e31cb5c49af8b916da5e92b4f2728c5910a7c7 /CMakeLists.txt
parent9ffb0f27c8eeda2e1fe9d65d8d47e12d973ad811 (diff)
CMake: Add a note about setting CAExcludePath.
Visual Studio's code analyzer lets you avoid analyzing external headers using CAExcludePath. Add a note suggesting that we might want to do this using the VS_USER_PROPS CMake property, but that for now we're using an environment variable in the builder config.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt6
1 files changed, 6 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ebb800e3e7..a7cd67d573 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -435,6 +435,12 @@ if( CMAKE_C_COMPILER_ID MATCHES "MSVC")
set(WIRESHARK_COMMON_FLAGS /Qspectre)
if(ENABLE_CODE_ANALYSIS)
+ # We should probably add a code_analysis.props file and use it to set
+ # CAExcludePath, otherwise we trigger on Qt's headers:
+ # https://stackoverflow.com/questions/59669026/how-to-add-property-to-affect-code-analysis-in-cmake
+ # https://gitlab.kitware.com/cmake/cmake/-/issues/19682
+ # For now, we set CAExcludePath=C:\Qt;%include% in the Visual Studio
+ # Code Analys builder's environment.
list(APPEND LOCAL_CFLAGS /analyze:WX-)
endif()