diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index be7232e5a..20b995444 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -535,8 +535,7 @@ endif() add_custom_target( memcheck COMMAND - PYBIND11_TESTING_WITH_VALGRIND=1 - PYTHONMALLOC=malloc + -E env PYBIND11_TESTING_WITH_VALGRIND=1 PYTHONMALLOC=malloc valgrind --leak-check=full --show-leak-kinds=definite,indirect