Changes in test/CMakeLists.txt [933:66156a3498ea:679:9c7639f3a741] in lemon-main
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
test/CMakeLists.txt
r933 r679 7 7 ${PROJECT_BINARY_DIR}/lemon 8 8 ) 9 10 SET(TEST_WITH_VALGRIND "NO" CACHE STRING11 "Run the test with valgrind (YES/NO).")12 SET(VALGRIND_FLAGS "" CACHE STRING "Valgrind flags used by the tests.")13 9 14 10 SET(TESTS … … 46 42 47 43 IF(LEMON_HAVE_LP) 48 IF(${CMAKE_BUILD_TYPE} STREQUAL "Maintainer") 49 ADD_EXECUTABLE(lp_test lp_test.cc) 50 ELSE() 51 ADD_EXECUTABLE(lp_test EXCLUDE_FROM_ALL lp_test.cc) 52 ENDIF() 53 44 ADD_EXECUTABLE(lp_test lp_test.cc) 54 45 SET(LP_TEST_LIBS lemon) 55 46 … … 87 78 88 79 IF(LEMON_HAVE_MIP) 89 IF(${CMAKE_BUILD_TYPE} STREQUAL "Maintainer") 90 ADD_EXECUTABLE(mip_test mip_test.cc) 91 ELSE() 92 ADD_EXECUTABLE(mip_test EXCLUDE_FROM_ALL mip_test.cc) 93 ENDIF() 94 80 ADD_EXECUTABLE(mip_test mip_test.cc) 95 81 SET(MIP_TEST_LIBS lemon) 96 82 … … 128 114 129 115 FOREACH(TEST_NAME ${TESTS}) 130 IF(${CMAKE_BUILD_TYPE} STREQUAL "Maintainer") 131 ADD_EXECUTABLE(${TEST_NAME} ${TEST_NAME}.cc) 132 ELSE() 133 ADD_EXECUTABLE(${TEST_NAME} EXCLUDE_FROM_ALL ${TEST_NAME}.cc) 134 ENDIF() 116 ADD_EXECUTABLE(${TEST_NAME} ${TEST_NAME}.cc) 135 117 TARGET_LINK_LIBRARIES(${TEST_NAME} lemon) 136 IF(TEST_WITH_VALGRIND) 137 ADD_TEST(${TEST_NAME} 138 valgrind --error-exitcode=1 ${VALGRIND_FLAGS} 139 ${CMAKE_CURRENT_BINARY_DIR}/${TEST_NAME} ) 140 ELSE() 141 ADD_TEST(${TEST_NAME} ${TEST_NAME}) 142 ENDIF() 143 ADD_DEPENDENCIES(check ${TEST_NAME}) 118 ADD_TEST(${TEST_NAME} ${TEST_NAME}) 144 119 ENDFOREACH()
Note: See TracChangeset
for help on using the changeset viewer.