COIN-OR::LEMON - Graph Library

Changes in / [910:4e36fdf856b7:912:cc9bb4f95ed3] in lemon-1.2


Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • test/CMakeLists.txt

    r905 r912  
    77  ${PROJECT_BINARY_DIR}/lemon
    88)
     9
     10SET(TEST_WITH_VALGRIND "NO" CACHE STRING
     11  "Run the test with valgrind (YES/NO).")
     12SET(VALGRIND_FLAGS "" CACHE STRING "Valgrind flags used by the tests.")
    913
    1014SET(TESTS
     
    134138  ENDIF()
    135139  TARGET_LINK_LIBRARIES(${TEST_NAME} lemon)
    136   ADD_TEST(${TEST_NAME} ${TEST_NAME})
     140    IF(TEST_WITH_VALGRIND)
     141      ADD_TEST(${TEST_NAME}
     142        valgrind --error-exitcode=1 ${VALGRIND_FLAGS}
     143        ${CMAKE_CURRENT_BINARY_DIR}/${TEST_NAME} )
     144    ELSE()
     145      ADD_TEST(${TEST_NAME} ${TEST_NAME})
     146    ENDIF()
    137147  ADD_DEPENDENCIES(check ${TEST_NAME})
    138148ENDFOREACH()
Note: See TracChangeset for help on using the changeset viewer.