Changes in test/CMakeLists.txt [679:9c7639f3a741:959:17e36e175725] in lemon-main
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
test/CMakeLists.txt
r679 r959 7 7 ${PROJECT_BINARY_DIR}/lemon 8 8 ) 9 10 SET(TEST_WITH_VALGRIND "NO" CACHE STRING 11 "Run the test with valgrind (YES/NO).") 12 SET(VALGRIND_FLAGS "" CACHE STRING "Valgrind flags used by the tests.") 9 13 10 14 SET(TESTS … … 28 32 heap_test 29 33 kruskal_test 34 lgf_test 30 35 maps_test 31 36 matching_test … … 42 47 43 48 IF(LEMON_HAVE_LP) 44 ADD_EXECUTABLE(lp_test lp_test.cc) 49 IF(${CMAKE_BUILD_TYPE} STREQUAL "Maintainer") 50 ADD_EXECUTABLE(lp_test lp_test.cc) 51 ELSE() 52 ADD_EXECUTABLE(lp_test EXCLUDE_FROM_ALL lp_test.cc) 53 ENDIF() 54 45 55 SET(LP_TEST_LIBS lemon) 46 56 … … 57 67 TARGET_LINK_LIBRARIES(lp_test ${LP_TEST_LIBS}) 58 68 ADD_TEST(lp_test lp_test) 69 ADD_DEPENDENCIES(check lp_test) 59 70 60 71 IF(WIN32 AND LEMON_HAVE_GLPK) … … 78 89 79 90 IF(LEMON_HAVE_MIP) 80 ADD_EXECUTABLE(mip_test mip_test.cc) 91 IF(${CMAKE_BUILD_TYPE} STREQUAL "Maintainer") 92 ADD_EXECUTABLE(mip_test mip_test.cc) 93 ELSE() 94 ADD_EXECUTABLE(mip_test EXCLUDE_FROM_ALL mip_test.cc) 95 ENDIF() 96 81 97 SET(MIP_TEST_LIBS lemon) 82 98 … … 93 109 TARGET_LINK_LIBRARIES(mip_test ${MIP_TEST_LIBS}) 94 110 ADD_TEST(mip_test mip_test) 111 ADD_DEPENDENCIES(check mip_test) 95 112 96 113 IF(WIN32 AND LEMON_HAVE_GLPK) … … 114 131 115 132 FOREACH(TEST_NAME ${TESTS}) 116 ADD_EXECUTABLE(${TEST_NAME} ${TEST_NAME}.cc) 133 IF(${CMAKE_BUILD_TYPE} STREQUAL "Maintainer") 134 ADD_EXECUTABLE(${TEST_NAME} ${TEST_NAME}.cc) 135 ELSE() 136 ADD_EXECUTABLE(${TEST_NAME} EXCLUDE_FROM_ALL ${TEST_NAME}.cc) 137 ENDIF() 117 138 TARGET_LINK_LIBRARIES(${TEST_NAME} lemon) 118 ADD_TEST(${TEST_NAME} ${TEST_NAME}) 139 IF(TEST_WITH_VALGRIND) 140 ADD_TEST(${TEST_NAME} 141 valgrind --error-exitcode=1 ${VALGRIND_FLAGS} 142 ${CMAKE_CURRENT_BINARY_DIR}/${TEST_NAME} ) 143 ELSE() 144 ADD_TEST(${TEST_NAME} ${TEST_NAME}) 145 ENDIF() 146 ADD_DEPENDENCIES(check ${TEST_NAME}) 119 147 ENDFOREACH()
Note: See TracChangeset
for help on using the changeset viewer.