File: valgrind.pri

package info (click to toggle)
psi 0.14-2
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 12,704 kB
  • ctags: 22,303
  • sloc: cpp: 150,140; ansic: 26,319; xml: 1,215; makefile: 236; python: 178; ruby: 129; sh: 27
file content (17 lines) | stat: -rw-r--r-- 736 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
unix {
	# valgrind target (only shows valgrind output)
	VALGRIND_OPTIONS = -q --num-callers=40 --leak-check=full --show-reachable=yes --suppressions=$$PWD/valgrind.supp
	QMAKE_EXTRA_TARGETS += valgrind
	valgrind.depends = $$EXEC_TARGET
	valgrind.commands = valgrind $$VALGRIND_OPTIONS ./$$EXEC_TARGET | grep -E '==\d+=='

	# valgrind_supp target (generate suppressions)
	QMAKE_EXTRA_TARGETS += valgrind_supp
	valgrind_supp.depends = $$EXEC_TARGET
	valgrind_supp.commands = valgrind $$VALGRIND_OPTIONS --gen-suppressions=all ./$$EXEC_TARGET

	# callgrind profiling
	QMAKE_EXTRA_TARGETS += callgrind
	callgrind.depends = $$EXEC_TARGET
	callgrind.commands = valgrind --tool=callgrind --dump-instr=yes --collect-jumps=yes ./$$EXEC_TARGET
}