CHANGE valgrind tests return 1 on error
@@ -17,7 +17,7 @@ if (ENABLE_VALGRIND_TESTS)
find_program(valgrind_FOUND valgrind)
if (valgrind_FOUND)
foreach (test_name IN LISTS tests)
- add_test(${test_name}_valgrind valgrind --leak-check=full ${CMAKE_BINARY_DIR}/tests/${test_name})
+ add_test(${test_name}_valgrind valgrind --leak-check=full --error-exitcode=1 ${CMAKE_BINARY_DIR}/tests/${test_name})
endforeach()
else (valgrind_FOUND)
Message("-- valgrind executable not found! Disabling memory leaks tests")
