Changes in test/CMakeLists.txt [679:9c7639f3a741:933:66156a3498ea] in lemon-main
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
test/CMakeLists.txt
r679 r933 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 … … 42 46 43 47 IF(LEMON_HAVE_LP) 44 ADD_EXECUTABLE(lp_test lp_test.cc) 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 45 54 SET(LP_TEST_LIBS lemon) 46 55 … … 78 87 79 88 IF(LEMON_HAVE_MIP) 80 ADD_EXECUTABLE(mip_test mip_test.cc) 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 81 95 SET(MIP_TEST_LIBS lemon) 82 96 … … 114 128 115 129 FOREACH(TEST_NAME ${TESTS}) 116 ADD_EXECUTABLE(${TEST_NAME} ${TEST_NAME}.cc) 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() 117 135 TARGET_LINK_LIBRARIES(${TEST_NAME} lemon) 118 ADD_TEST(${TEST_NAME} ${TEST_NAME}) 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}) 119 144 ENDFOREACH()
Note: See TracChangeset
for help on using the changeset viewer.