author | Alpar Juttner <alpar@cs.elte.hu> |
Mon, 25 Oct 2010 15:33:57 +0200 | |
changeset 911 | 481496e6d71f |
parent 905 | de428ebb47ab |
child 914 | 35ba7236bd67 |
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 |
kpeter@698 | 12 |
bellman_ford_test |
ladanyi@141 | 13 |
bfs_test |
alpar@424 | 14 |
circulation_test |
kpeter@649 | 15 |
connectivity_test |
ladanyi@141 | 16 |
counter_test |
ladanyi@141 | 17 |
dfs_test |
ladanyi@141 | 18 |
digraph_test |
kpeter@170 | 19 |
dijkstra_test |
ladanyi@141 | 20 |
dim_test |
deba@488 | 21 |
edge_set_test |
ladanyi@141 | 22 |
error_test |
ladanyi@522 | 23 |
euler_test |
deba@869 | 24 |
fractional_matching_test |
tapolcai@543 | 25 |
gomory_hu_test |
deba@200 | 26 |
graph_copy_test |
ladanyi@141 | 27 |
graph_test |
kpeter@171 | 28 |
graph_utils_test |
deba@410 | 29 |
hao_orlin_test |
deba@203 | 30 |
heap_test |
ladanyi@141 | 31 |
kruskal_test |
ladanyi@141 | 32 |
maps_test |
kpeter@594 | 33 |
matching_test |
kpeter@904 | 34 |
max_clique_test |
deba@501 | 35 |
min_cost_arborescence_test |
kpeter@601 | 36 |
min_cost_flow_test |
kpeter@763 | 37 |
min_mean_cycle_test |
alpar@424 | 38 |
path_test |
deba@797 | 39 |
planarity_test |
alpar@424 | 40 |
preflow_test |
ladanyi@473 | 41 |
radix_sort_test |
alpar@225 | 42 |
random_test |
alpar@424 | 43 |
suurballe_test |
ladanyi@141 | 44 |
time_measure_test |
ladanyi@679 | 45 |
unionfind_test |
ladanyi@679 | 46 |
) |
ladanyi@141 | 47 |
|
ladanyi@627 | 48 |
IF(LEMON_HAVE_LP) |
alpar@909 | 49 |
IF(${CMAKE_BUILD_TYPE} STREQUAL "Maintainer") |
alpar@909 | 50 |
ADD_EXECUTABLE(lp_test lp_test.cc) |
alpar@909 | 51 |
ELSE() |
alpar@909 | 52 |
ADD_EXECUTABLE(lp_test EXCLUDE_FROM_ALL lp_test.cc) |
alpar@909 | 53 |
ENDIF() |
alpar@909 | 54 |
|
ladanyi@620 | 55 |
SET(LP_TEST_LIBS lemon) |
ladanyi@679 | 56 |
|
ladanyi@627 | 57 |
IF(LEMON_HAVE_GLPK) |
ladanyi@620 | 58 |
SET(LP_TEST_LIBS ${LP_TEST_LIBS} ${GLPK_LIBRARIES}) |
ladanyi@679 | 59 |
ENDIF() |
ladanyi@627 | 60 |
IF(LEMON_HAVE_CPLEX) |
ladanyi@620 | 61 |
SET(LP_TEST_LIBS ${LP_TEST_LIBS} ${CPLEX_LIBRARIES}) |
ladanyi@679 | 62 |
ENDIF() |
ladanyi@627 | 63 |
IF(LEMON_HAVE_CLP) |
ladanyi@621 | 64 |
SET(LP_TEST_LIBS ${LP_TEST_LIBS} ${COIN_CLP_LIBRARIES}) |
ladanyi@679 | 65 |
ENDIF() |
ladanyi@679 | 66 |
|
ladanyi@620 | 67 |
TARGET_LINK_LIBRARIES(lp_test ${LP_TEST_LIBS}) |
ladanyi@473 | 68 |
ADD_TEST(lp_test lp_test) |
ladanyi@473 | 69 |
|
ladanyi@627 | 70 |
IF(WIN32 AND LEMON_HAVE_GLPK) |
ladanyi@473 | 71 |
GET_TARGET_PROPERTY(TARGET_LOC lp_test LOCATION) |
ladanyi@473 | 72 |
GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH) |
ladanyi@473 | 73 |
ADD_CUSTOM_COMMAND(TARGET lp_test POST_BUILD |
ladanyi@679 | 74 |
COMMAND ${CMAKE_COMMAND} -E copy ${GLPK_BIN_DIR}/glpk.dll ${TARGET_PATH} |
ladanyi@679 | 75 |
COMMAND ${CMAKE_COMMAND} -E copy ${GLPK_BIN_DIR}/libltdl3.dll ${TARGET_PATH} |
ladanyi@679 | 76 |
COMMAND ${CMAKE_COMMAND} -E copy ${GLPK_BIN_DIR}/zlib1.dll ${TARGET_PATH} |
ladanyi@473 | 77 |
) |
ladanyi@679 | 78 |
ENDIF() |
ladanyi@679 | 79 |
|
ladanyi@627 | 80 |
IF(WIN32 AND LEMON_HAVE_CPLEX) |
ladanyi@620 | 81 |
GET_TARGET_PROPERTY(TARGET_LOC lp_test LOCATION) |
ladanyi@620 | 82 |
GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH) |
ladanyi@620 | 83 |
ADD_CUSTOM_COMMAND(TARGET lp_test POST_BUILD |
ladanyi@679 | 84 |
COMMAND ${CMAKE_COMMAND} -E copy ${CPLEX_BIN_DIR}/cplex91.dll ${TARGET_PATH} |
ladanyi@620 | 85 |
) |
ladanyi@679 | 86 |
ENDIF() |
ladanyi@679 | 87 |
ENDIF() |
ladanyi@473 | 88 |
|
ladanyi@627 | 89 |
IF(LEMON_HAVE_MIP) |
alpar@909 | 90 |
IF(${CMAKE_BUILD_TYPE} STREQUAL "Maintainer") |
alpar@909 | 91 |
ADD_EXECUTABLE(mip_test mip_test.cc) |
alpar@909 | 92 |
ELSE() |
alpar@909 | 93 |
ADD_EXECUTABLE(mip_test EXCLUDE_FROM_ALL mip_test.cc) |
alpar@909 | 94 |
ENDIF() |
alpar@909 | 95 |
|
ladanyi@620 | 96 |
SET(MIP_TEST_LIBS lemon) |
ladanyi@679 | 97 |
|
ladanyi@627 | 98 |
IF(LEMON_HAVE_GLPK) |
ladanyi@620 | 99 |
SET(MIP_TEST_LIBS ${MIP_TEST_LIBS} ${GLPK_LIBRARIES}) |
ladanyi@679 | 100 |
ENDIF() |
ladanyi@627 | 101 |
IF(LEMON_HAVE_CPLEX) |
ladanyi@620 | 102 |
SET(MIP_TEST_LIBS ${MIP_TEST_LIBS} ${CPLEX_LIBRARIES}) |
ladanyi@679 | 103 |
ENDIF() |
ladanyi@627 | 104 |
IF(LEMON_HAVE_CBC) |
ladanyi@621 | 105 |
SET(MIP_TEST_LIBS ${MIP_TEST_LIBS} ${COIN_CBC_LIBRARIES}) |
ladanyi@679 | 106 |
ENDIF() |
ladanyi@679 | 107 |
|
ladanyi@620 | 108 |
TARGET_LINK_LIBRARIES(mip_test ${MIP_TEST_LIBS}) |
ladanyi@473 | 109 |
ADD_TEST(mip_test mip_test) |
ladanyi@473 | 110 |
|
ladanyi@627 | 111 |
IF(WIN32 AND LEMON_HAVE_GLPK) |
ladanyi@473 | 112 |
GET_TARGET_PROPERTY(TARGET_LOC mip_test LOCATION) |
ladanyi@473 | 113 |
GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH) |
ladanyi@473 | 114 |
ADD_CUSTOM_COMMAND(TARGET mip_test POST_BUILD |
ladanyi@679 | 115 |
COMMAND ${CMAKE_COMMAND} -E copy ${GLPK_BIN_DIR}/glpk.dll ${TARGET_PATH} |
ladanyi@679 | 116 |
COMMAND ${CMAKE_COMMAND} -E copy ${GLPK_BIN_DIR}/libltdl3.dll ${TARGET_PATH} |
ladanyi@679 | 117 |
COMMAND ${CMAKE_COMMAND} -E copy ${GLPK_BIN_DIR}/zlib1.dll ${TARGET_PATH} |
ladanyi@473 | 118 |
) |
ladanyi@679 | 119 |
ENDIF() |
ladanyi@679 | 120 |
|
ladanyi@627 | 121 |
IF(WIN32 AND LEMON_HAVE_CPLEX) |
ladanyi@620 | 122 |
GET_TARGET_PROPERTY(TARGET_LOC mip_test LOCATION) |
ladanyi@620 | 123 |
GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH) |
ladanyi@620 | 124 |
ADD_CUSTOM_COMMAND(TARGET mip_test POST_BUILD |
ladanyi@679 | 125 |
COMMAND ${CMAKE_COMMAND} -E copy ${CPLEX_BIN_DIR}/cplex91.dll ${TARGET_PATH} |
ladanyi@620 | 126 |
) |
ladanyi@679 | 127 |
ENDIF() |
ladanyi@679 | 128 |
ENDIF() |
ladanyi@473 | 129 |
|
alpar@225 | 130 |
FOREACH(TEST_NAME ${TESTS}) |
alpar@901 | 131 |
IF(${CMAKE_BUILD_TYPE} STREQUAL "Maintainer") |
alpar@901 | 132 |
ADD_EXECUTABLE(${TEST_NAME} ${TEST_NAME}.cc) |
alpar@901 | 133 |
ELSE() |
alpar@901 | 134 |
ADD_EXECUTABLE(${TEST_NAME} EXCLUDE_FROM_ALL ${TEST_NAME}.cc) |
alpar@901 | 135 |
ENDIF() |
alpar@225 | 136 |
TARGET_LINK_LIBRARIES(${TEST_NAME} lemon) |
alpar@225 | 137 |
ADD_TEST(${TEST_NAME} ${TEST_NAME}) |
ladanyi@897 | 138 |
ADD_DEPENDENCIES(check ${TEST_NAME}) |
ladanyi@679 | 139 |
ENDFOREACH() |