mirror of
https://github.com/polybar/polybar.git
synced 2024-11-18 13:55:11 -05:00
feat(cmake): Valgrind memcheck command
This commit is contained in:
parent
5e2a0bd298
commit
060d198b8e
2 changed files with 82 additions and 0 deletions
68
.valgrind-suppressions
Normal file
68
.valgrind-suppressions
Normal file
|
@ -0,0 +1,68 @@
|
|||
{
|
||||
xft/fontconfig
|
||||
Memcheck:Leak
|
||||
match-leak-kinds: definite
|
||||
fun:malloc
|
||||
fun:FcPatternCreate
|
||||
fun:FcFontRenderPrepare
|
||||
fun:FcFontMatch
|
||||
fun:XftFontMatch
|
||||
fun:XftFontOpenName
|
||||
...
|
||||
...
|
||||
...
|
||||
...
|
||||
...
|
||||
...
|
||||
}
|
||||
{
|
||||
xft/fontconfig
|
||||
Memcheck:Leak
|
||||
match-leak-kinds: definite
|
||||
fun:malloc
|
||||
obj:/usr/lib/libfontconfig.so.1.9.2
|
||||
obj:/usr/lib/libfontconfig.so.1.9.2
|
||||
fun:FcPatternAddDouble
|
||||
obj:/usr/lib/libXft.so.2.3.2
|
||||
obj:/usr/lib/libXft.so.2.3.2
|
||||
obj:/usr/lib/libXft.so.2.3.2
|
||||
obj:/usr/lib/libXft.so.2.3.2
|
||||
fun:XftDefaultHasRender
|
||||
fun:XftDefaultSubstitute
|
||||
fun:XftFontMatch
|
||||
fun:XftFontOpenName
|
||||
}
|
||||
{
|
||||
xft/fontconfig
|
||||
Memcheck:Leak
|
||||
match-leak-kinds: definite
|
||||
fun:malloc
|
||||
fun:XftFontCheckGlyph
|
||||
fun:XftGlyphRender
|
||||
fun:XftDrawGlyphs
|
||||
fun:XftDrawString16
|
||||
...
|
||||
...
|
||||
...
|
||||
...
|
||||
...
|
||||
...
|
||||
...
|
||||
}
|
||||
{
|
||||
xft/fontconfig
|
||||
Memcheck:Leak
|
||||
match-leak-kinds: definite
|
||||
fun:realloc
|
||||
obj:/usr/lib/libfontconfig.so.1.9.2
|
||||
obj:/usr/lib/libfontconfig.so.1.9.2
|
||||
fun:FcFontRenderPrepare
|
||||
fun:FcFontMatch
|
||||
fun:XftFontMatch
|
||||
fun:XftFontOpenName
|
||||
...
|
||||
...
|
||||
...
|
||||
...
|
||||
...
|
||||
}
|
|
@ -45,3 +45,17 @@ add_custom_command(TARGET codecheck-fix COMMAND
|
|||
${PROJECT_SOURCE_DIR}/common/clang-tidy.sh ${PROJECT_BINARY_DIR} -fix ${PROJECT_SOURCE_DIR}/src)
|
||||
|
||||
# }}}
|
||||
|
||||
# Target: memcheck (valgrind) {{{
|
||||
|
||||
add_custom_target(memcheck)
|
||||
add_custom_command(TARGET memcheck COMMAND
|
||||
valgrind
|
||||
--tool=memcheck
|
||||
--leak-check=yes
|
||||
--track-origins=yes
|
||||
--show-reachable=yes
|
||||
--suppressions=${PROJECT_SOURCE_DIR}/.valgrind-suppressions
|
||||
${PROJECT_BINARY_DIR}/${CMAKE_INSTALL_BINDIR}/${PROJECT_NAME} example --config=${PROJECT_SOURCE_DIR}/examples/config)
|
||||
|
||||
# }}}
|
||||
|
|
Loading…
Reference in a new issue