diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index e5f6dc55a..9da2c80d4 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -13,8 +13,7 @@ endif() if(JSON_Valgrind) find_program(CMAKE_MEMORYCHECK_COMMAND valgrind) message(STATUS "Executing test suite with Valgrind (${CMAKE_MEMORYCHECK_COMMAND})") - set(MEMORYCHECK_COMMAND_OPTIONS "--error-exitcode=1 --leak-check=full") - set(memcheck_command "${CMAKE_MEMORYCHECK_COMMAND} ${CMAKE_MEMORYCHECK_COMMAND_OPTIONS}") + set(memcheck_command "${CMAKE_MEMORYCHECK_COMMAND} ${CMAKE_MEMORYCHECK_COMMAND_OPTIONS} --error-exitcode=1 --leak-check=full") separate_arguments(memcheck_command) endif()