author | Peter Kovacs <kpeter@inf.elte.hu> |
Wed, 08 Jul 2009 17:21:30 +0200 | |
changeset 709 | 0747f332c478 |
parent 649 | 76cbcb3e9bbb |
child 698 | f9746e45246e |
child 763 | 93cd93e82f9b |
child 927 | 16d466589b54 |
permissions | -rw-r--r-- |
ladanyi@510 | 1 |
INCLUDE_DIRECTORIES( |
ladanyi@549 | 2 |
${PROJECT_SOURCE_DIR} |
ladanyi@510 | 3 |
${PROJECT_BINARY_DIR} |
ladanyi@510 | 4 |
) |
ladanyi@141 | 5 |
|
ladanyi@679 | 6 |
LINK_DIRECTORIES( |
ladanyi@679 | 7 |
${PROJECT_BINARY_DIR}/lemon |
ladanyi@679 | 8 |
) |
ladanyi@141 | 9 |
|
alpar@225 | 10 |
SET(TESTS |
deba@488 | 11 |
adaptors_test |
ladanyi@141 | 12 |
bfs_test |
alpar@424 | 13 |
circulation_test |
kpeter@649 | 14 |
connectivity_test |
ladanyi@141 | 15 |
counter_test |
ladanyi@141 | 16 |
dfs_test |
ladanyi@141 | 17 |
digraph_test |
kpeter@170 | 18 |
dijkstra_test |
ladanyi@141 | 19 |
dim_test |
deba@488 | 20 |
edge_set_test |
ladanyi@141 | 21 |
error_test |
ladanyi@522 | 22 |
euler_test |
tapolcai@543 | 23 |
gomory_hu_test |
deba@200 | 24 |
graph_copy_test |
ladanyi@141 | 25 |
graph_test |
kpeter@171 | 26 |
graph_utils_test |
deba@410 | 27 |
hao_orlin_test |
deba@203 | 28 |
heap_test |
ladanyi@141 | 29 |
kruskal_test |
ladanyi@141 | 30 |
maps_test |
kpeter@594 | 31 |
matching_test |
deba@501 | 32 |
min_cost_arborescence_test |
kpeter@601 | 33 |
min_cost_flow_test |
alpar@424 | 34 |
path_test |
alpar@424 | 35 |
preflow_test |
ladanyi@473 | 36 |
radix_sort_test |
alpar@225 | 37 |
random_test |
alpar@424 | 38 |
suurballe_test |
ladanyi@141 | 39 |
time_measure_test |
ladanyi@679 | 40 |
unionfind_test |
ladanyi@679 | 41 |
) |
ladanyi@141 | 42 |
|
ladanyi@627 | 43 |
IF(LEMON_HAVE_LP) |
ladanyi@473 | 44 |
ADD_EXECUTABLE(lp_test lp_test.cc) |
ladanyi@620 | 45 |
SET(LP_TEST_LIBS lemon) |
ladanyi@679 | 46 |
|
ladanyi@627 | 47 |
IF(LEMON_HAVE_GLPK) |
ladanyi@620 | 48 |
SET(LP_TEST_LIBS ${LP_TEST_LIBS} ${GLPK_LIBRARIES}) |
ladanyi@679 | 49 |
ENDIF() |
ladanyi@627 | 50 |
IF(LEMON_HAVE_CPLEX) |
ladanyi@620 | 51 |
SET(LP_TEST_LIBS ${LP_TEST_LIBS} ${CPLEX_LIBRARIES}) |
ladanyi@679 | 52 |
ENDIF() |
ladanyi@627 | 53 |
IF(LEMON_HAVE_CLP) |
ladanyi@621 | 54 |
SET(LP_TEST_LIBS ${LP_TEST_LIBS} ${COIN_CLP_LIBRARIES}) |
ladanyi@679 | 55 |
ENDIF() |
ladanyi@679 | 56 |
|
ladanyi@620 | 57 |
TARGET_LINK_LIBRARIES(lp_test ${LP_TEST_LIBS}) |
ladanyi@473 | 58 |
ADD_TEST(lp_test lp_test) |
ladanyi@473 | 59 |
|
ladanyi@627 | 60 |
IF(WIN32 AND LEMON_HAVE_GLPK) |
ladanyi@473 | 61 |
GET_TARGET_PROPERTY(TARGET_LOC lp_test LOCATION) |
ladanyi@473 | 62 |
GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH) |
ladanyi@473 | 63 |
ADD_CUSTOM_COMMAND(TARGET lp_test POST_BUILD |
ladanyi@679 | 64 |
COMMAND ${CMAKE_COMMAND} -E copy ${GLPK_BIN_DIR}/glpk.dll ${TARGET_PATH} |
ladanyi@679 | 65 |
COMMAND ${CMAKE_COMMAND} -E copy ${GLPK_BIN_DIR}/libltdl3.dll ${TARGET_PATH} |
ladanyi@679 | 66 |
COMMAND ${CMAKE_COMMAND} -E copy ${GLPK_BIN_DIR}/zlib1.dll ${TARGET_PATH} |
ladanyi@473 | 67 |
) |
ladanyi@679 | 68 |
ENDIF() |
ladanyi@679 | 69 |
|
ladanyi@627 | 70 |
IF(WIN32 AND LEMON_HAVE_CPLEX) |
ladanyi@620 | 71 |
GET_TARGET_PROPERTY(TARGET_LOC lp_test LOCATION) |
ladanyi@620 | 72 |
GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH) |
ladanyi@620 | 73 |
ADD_CUSTOM_COMMAND(TARGET lp_test POST_BUILD |
ladanyi@679 | 74 |
COMMAND ${CMAKE_COMMAND} -E copy ${CPLEX_BIN_DIR}/cplex91.dll ${TARGET_PATH} |
ladanyi@620 | 75 |
) |
ladanyi@679 | 76 |
ENDIF() |
ladanyi@679 | 77 |
ENDIF() |
ladanyi@473 | 78 |
|
ladanyi@627 | 79 |
IF(LEMON_HAVE_MIP) |
ladanyi@473 | 80 |
ADD_EXECUTABLE(mip_test mip_test.cc) |
ladanyi@620 | 81 |
SET(MIP_TEST_LIBS lemon) |
ladanyi@679 | 82 |
|
ladanyi@627 | 83 |
IF(LEMON_HAVE_GLPK) |
ladanyi@620 | 84 |
SET(MIP_TEST_LIBS ${MIP_TEST_LIBS} ${GLPK_LIBRARIES}) |
ladanyi@679 | 85 |
ENDIF() |
ladanyi@627 | 86 |
IF(LEMON_HAVE_CPLEX) |
ladanyi@620 | 87 |
SET(MIP_TEST_LIBS ${MIP_TEST_LIBS} ${CPLEX_LIBRARIES}) |
ladanyi@679 | 88 |
ENDIF() |
ladanyi@627 | 89 |
IF(LEMON_HAVE_CBC) |
ladanyi@621 | 90 |
SET(MIP_TEST_LIBS ${MIP_TEST_LIBS} ${COIN_CBC_LIBRARIES}) |
ladanyi@679 | 91 |
ENDIF() |
ladanyi@679 | 92 |
|
ladanyi@620 | 93 |
TARGET_LINK_LIBRARIES(mip_test ${MIP_TEST_LIBS}) |
ladanyi@473 | 94 |
ADD_TEST(mip_test mip_test) |
ladanyi@473 | 95 |
|
ladanyi@627 | 96 |
IF(WIN32 AND LEMON_HAVE_GLPK) |
ladanyi@473 | 97 |
GET_TARGET_PROPERTY(TARGET_LOC mip_test LOCATION) |
ladanyi@473 | 98 |
GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH) |
ladanyi@473 | 99 |
ADD_CUSTOM_COMMAND(TARGET mip_test POST_BUILD |
ladanyi@679 | 100 |
COMMAND ${CMAKE_COMMAND} -E copy ${GLPK_BIN_DIR}/glpk.dll ${TARGET_PATH} |
ladanyi@679 | 101 |
COMMAND ${CMAKE_COMMAND} -E copy ${GLPK_BIN_DIR}/libltdl3.dll ${TARGET_PATH} |
ladanyi@679 | 102 |
COMMAND ${CMAKE_COMMAND} -E copy ${GLPK_BIN_DIR}/zlib1.dll ${TARGET_PATH} |
ladanyi@473 | 103 |
) |
ladanyi@679 | 104 |
ENDIF() |
ladanyi@679 | 105 |
|
ladanyi@627 | 106 |
IF(WIN32 AND LEMON_HAVE_CPLEX) |
ladanyi@620 | 107 |
GET_TARGET_PROPERTY(TARGET_LOC mip_test LOCATION) |
ladanyi@620 | 108 |
GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH) |
ladanyi@620 | 109 |
ADD_CUSTOM_COMMAND(TARGET mip_test POST_BUILD |
ladanyi@679 | 110 |
COMMAND ${CMAKE_COMMAND} -E copy ${CPLEX_BIN_DIR}/cplex91.dll ${TARGET_PATH} |
ladanyi@620 | 111 |
) |
ladanyi@679 | 112 |
ENDIF() |
ladanyi@679 | 113 |
ENDIF() |
ladanyi@473 | 114 |
|
alpar@225 | 115 |
FOREACH(TEST_NAME ${TESTS}) |
alpar@225 | 116 |
ADD_EXECUTABLE(${TEST_NAME} ${TEST_NAME}.cc) |
alpar@225 | 117 |
TARGET_LINK_LIBRARIES(${TEST_NAME} lemon) |
alpar@225 | 118 |
ADD_TEST(${TEST_NAME} ${TEST_NAME}) |
ladanyi@679 | 119 |
ENDFOREACH() |