Skip to content

Commit 17c1cbe

Browse files
committed
Add Valgrind task to CMake
1 parent f4ec166 commit 17c1cbe

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,4 @@ before_install:
1919
&& cd ..
2020
&& rm gtest-1.7.0.zip
2121

22-
script: mkdir build && cd build && cmake .. -Dtest=ON && make && test/runTests
22+
script: mkdir build && cd build && cmake .. -Dtest=ON && make && test/runTests && make memcheck

CMakeLists.txt

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,4 +99,12 @@ INSTALL(TARGETS graphqlparser
9999

100100
IF (test)
101101
ADD_SUBDIRECTORY(test)
102+
103+
if(UNIX)
104+
# setup valgrind
105+
ADD_CUSTOM_TARGET(memcheck
106+
valgrind --leak-check=full --dsymutil=yes --error-exitcode=1 ./test/runTests >/dev/null
107+
)
108+
endif()
109+
102110
ENDIF()

0 commit comments

Comments
 (0)