author | Peter Kovacs <kpeter@inf.elte.hu> |
Wed, 12 Aug 2009 09:45:15 +0200 | |
changeset 768 | 0a42883c8221 |
parent 679 | 9c7639f3a741 |
child 770 | 432c54cec63c |
permissions | -rw-r--r-- |
ladanyi@499 | 1 |
INCLUDE_DIRECTORIES( |
ladanyi@549 | 2 |
${PROJECT_SOURCE_DIR} |
ladanyi@499 | 3 |
${PROJECT_BINARY_DIR} |
ladanyi@499 | 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@512 | 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@512 | 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@490 | 32 |
min_cost_arborescence_test |
kpeter@601 | 33 |
min_cost_flow_test |
kpeter@763 | 34 |
min_mean_cycle_test |
alpar@424 | 35 |
path_test |
alpar@424 | 36 |
preflow_test |
ladanyi@473 | 37 |
radix_sort_test |
alpar@225 | 38 |
random_test |
alpar@424 | 39 |
suurballe_test |
ladanyi@141 | 40 |
time_measure_test |
ladanyi@679 | 41 |
unionfind_test |
ladanyi@679 | 42 |
) |
ladanyi@141 | 43 |
|
ladanyi@627 | 44 |
IF(LEMON_HAVE_LP) |
ladanyi@473 | 45 |
ADD_EXECUTABLE(lp_test lp_test.cc) |
ladanyi@620 | 46 |
SET(LP_TEST_LIBS lemon) |
ladanyi@679 | 47 |
|
ladanyi@627 | 48 |
IF(LEMON_HAVE_GLPK) |
ladanyi@620 | 49 |
SET(LP_TEST_LIBS ${LP_TEST_LIBS} ${GLPK_LIBRARIES}) |
ladanyi@679 | 50 |
ENDIF() |
ladanyi@627 | 51 |
IF(LEMON_HAVE_CPLEX) |
ladanyi@620 | 52 |
SET(LP_TEST_LIBS ${LP_TEST_LIBS} ${CPLEX_LIBRARIES}) |
ladanyi@679 | 53 |
ENDIF() |
ladanyi@627 | 54 |
IF(LEMON_HAVE_CLP) |
ladanyi@621 | 55 |
SET(LP_TEST_LIBS ${LP_TEST_LIBS} ${COIN_CLP_LIBRARIES}) |
ladanyi@679 | 56 |
ENDIF() |
ladanyi@679 | 57 |
|
ladanyi@620 | 58 |
TARGET_LINK_LIBRARIES(lp_test ${LP_TEST_LIBS}) |
ladanyi@473 | 59 |
ADD_TEST(lp_test lp_test) |
ladanyi@473 | 60 |
|
ladanyi@627 | 61 |
IF(WIN32 AND LEMON_HAVE_GLPK) |
ladanyi@473 | 62 |
GET_TARGET_PROPERTY(TARGET_LOC lp_test LOCATION) |
ladanyi@473 | 63 |
GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH) |
ladanyi@473 | 64 |
ADD_CUSTOM_COMMAND(TARGET lp_test POST_BUILD |
ladanyi@679 | 65 |
COMMAND ${CMAKE_COMMAND} -E copy ${GLPK_BIN_DIR}/glpk.dll ${TARGET_PATH} |
ladanyi@679 | 66 |
COMMAND ${CMAKE_COMMAND} -E copy ${GLPK_BIN_DIR}/libltdl3.dll ${TARGET_PATH} |
ladanyi@679 | 67 |
COMMAND ${CMAKE_COMMAND} -E copy ${GLPK_BIN_DIR}/zlib1.dll ${TARGET_PATH} |
ladanyi@473 | 68 |
) |
ladanyi@679 | 69 |
ENDIF() |
ladanyi@679 | 70 |
|
ladanyi@627 | 71 |
IF(WIN32 AND LEMON_HAVE_CPLEX) |
ladanyi@620 | 72 |
GET_TARGET_PROPERTY(TARGET_LOC lp_test LOCATION) |
ladanyi@620 | 73 |
GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH) |
ladanyi@620 | 74 |
ADD_CUSTOM_COMMAND(TARGET lp_test POST_BUILD |
ladanyi@679 | 75 |
COMMAND ${CMAKE_COMMAND} -E copy ${CPLEX_BIN_DIR}/cplex91.dll ${TARGET_PATH} |
ladanyi@620 | 76 |
) |
ladanyi@679 | 77 |
ENDIF() |
ladanyi@679 | 78 |
ENDIF() |
ladanyi@473 | 79 |
|
ladanyi@627 | 80 |
IF(LEMON_HAVE_MIP) |
ladanyi@473 | 81 |
ADD_EXECUTABLE(mip_test mip_test.cc) |
ladanyi@620 | 82 |
SET(MIP_TEST_LIBS lemon) |
ladanyi@679 | 83 |
|
ladanyi@627 | 84 |
IF(LEMON_HAVE_GLPK) |
ladanyi@620 | 85 |
SET(MIP_TEST_LIBS ${MIP_TEST_LIBS} ${GLPK_LIBRARIES}) |
ladanyi@679 | 86 |
ENDIF() |
ladanyi@627 | 87 |
IF(LEMON_HAVE_CPLEX) |
ladanyi@620 | 88 |
SET(MIP_TEST_LIBS ${MIP_TEST_LIBS} ${CPLEX_LIBRARIES}) |
ladanyi@679 | 89 |
ENDIF() |
ladanyi@627 | 90 |
IF(LEMON_HAVE_CBC) |
ladanyi@621 | 91 |
SET(MIP_TEST_LIBS ${MIP_TEST_LIBS} ${COIN_CBC_LIBRARIES}) |
ladanyi@679 | 92 |
ENDIF() |
ladanyi@679 | 93 |
|
ladanyi@620 | 94 |
TARGET_LINK_LIBRARIES(mip_test ${MIP_TEST_LIBS}) |
ladanyi@473 | 95 |
ADD_TEST(mip_test mip_test) |
ladanyi@473 | 96 |
|
ladanyi@627 | 97 |
IF(WIN32 AND LEMON_HAVE_GLPK) |
ladanyi@473 | 98 |
GET_TARGET_PROPERTY(TARGET_LOC mip_test LOCATION) |
ladanyi@473 | 99 |
GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH) |
ladanyi@473 | 100 |
ADD_CUSTOM_COMMAND(TARGET mip_test POST_BUILD |
ladanyi@679 | 101 |
COMMAND ${CMAKE_COMMAND} -E copy ${GLPK_BIN_DIR}/glpk.dll ${TARGET_PATH} |
ladanyi@679 | 102 |
COMMAND ${CMAKE_COMMAND} -E copy ${GLPK_BIN_DIR}/libltdl3.dll ${TARGET_PATH} |
ladanyi@679 | 103 |
COMMAND ${CMAKE_COMMAND} -E copy ${GLPK_BIN_DIR}/zlib1.dll ${TARGET_PATH} |
ladanyi@473 | 104 |
) |
ladanyi@679 | 105 |
ENDIF() |
ladanyi@679 | 106 |
|
ladanyi@627 | 107 |
IF(WIN32 AND LEMON_HAVE_CPLEX) |
ladanyi@620 | 108 |
GET_TARGET_PROPERTY(TARGET_LOC mip_test LOCATION) |
ladanyi@620 | 109 |
GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH) |
ladanyi@620 | 110 |
ADD_CUSTOM_COMMAND(TARGET mip_test POST_BUILD |
ladanyi@679 | 111 |
COMMAND ${CMAKE_COMMAND} -E copy ${CPLEX_BIN_DIR}/cplex91.dll ${TARGET_PATH} |
ladanyi@620 | 112 |
) |
ladanyi@679 | 113 |
ENDIF() |
ladanyi@679 | 114 |
ENDIF() |
ladanyi@473 | 115 |
|
alpar@225 | 116 |
FOREACH(TEST_NAME ${TESTS}) |
alpar@225 | 117 |
ADD_EXECUTABLE(${TEST_NAME} ${TEST_NAME}.cc) |
alpar@225 | 118 |
TARGET_LINK_LIBRARIES(${TEST_NAME} lemon) |
alpar@225 | 119 |
ADD_TEST(${TEST_NAME} ${TEST_NAME}) |
ladanyi@679 | 120 |
ENDFOREACH() |