File tree Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Expand file tree Collapse file tree 1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,8 @@ macro(myproject_enable_cppcheck WARNINGS_AS_ERRORS CPPCHECK_OPTIONS)
11
11
if ("${CPPCHECK_OPTIONS} " STREQUAL "" )
12
12
# Enable all warnings that are actionable by the user of this toolset
13
13
# style should enable the other 3, but we'll be explicit just in case
14
+ set (SUPPRESS_DIR "*:${CMAKE_CURRENT_BINARY_DIR} /_deps/*.h" )
15
+ message (STATUS "CPPCHECK_OPTIONS suppress: ${SUPPRESS_DIR} " )
14
16
set (CMAKE_CXX_CPPCHECK
15
17
${CPPCHECK}
16
18
--template=${CPPCHECK_TEMPLATE}
@@ -26,7 +28,8 @@ macro(myproject_enable_cppcheck WARNINGS_AS_ERRORS CPPCHECK_OPTIONS)
26
28
# ignores code that cppcheck thinks is invalid C++
27
29
--suppress=syntaxError
28
30
--suppress=preprocessorErrorDirective
29
- --inconclusive )
31
+ --inconclusive
32
+ --suppress=${SUPPRESS_DIR} )
30
33
else ()
31
34
# if the user provides a CPPCHECK_OPTIONS with a template specified, it will override this template
32
35
set (CMAKE_CXX_CPPCHECK ${CPPCHECK} --template=${CPPCHECK_TEMPLATE} ${CPPCHECK_OPTIONS} )
You can’t perform that action at this time.
0 commit comments