Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Makefile: Valgrind flags have no effect #1030

Closed
tsemaylo opened this issue Mar 29, 2018 · 1 comment
Closed

Makefile: Valgrind flags have no effect #1030

tsemaylo opened this issue Mar 29, 2018 · 1 comment
Assignees
Labels
confirmed solution: proposed fix a fix for the issue has been proposed and waits for confirmation
Milestone

Comments

@tsemaylo
Copy link

tsemaylo commented Mar 29, 2018

There is the following Valgrind configuration in CMake file from test subdirectory (test/CMakeLists.txt).
And it looks like there is a typo.

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}")
    separate_arguments(memcheck_command)
endif()

Variable CMAKE_MEMORYCHECK_COMMAND_OPTIONS is not initialized instead of that we have set(MEMORYCHECK_COMMAND_OPTIONS, ...). Therefore automated execution of tests will not report any memory check problem.

@tsemaylo tsemaylo changed the title Makefile: Valgring flags have no effect Makefile: Valgrind flags have no effect Mar 29, 2018
nlohmann added a commit that referenced this issue Mar 29, 2018
@nlohmann nlohmann added confirmed solution: proposed fix a fix for the issue has been proposed and waits for confirmation labels Mar 29, 2018
@nlohmann nlohmann added this to the Release 3.1.3 milestone Mar 29, 2018
@nlohmann nlohmann self-assigned this Mar 29, 2018
@nlohmann
Copy link
Owner

Thanks for noting! Now I hope the checks do not fail :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
confirmed solution: proposed fix a fix for the issue has been proposed and waits for confirmation
Projects
None yet
Development

No branches or pull requests

2 participants