author | Peter Kovacs <kpeter@inf.elte.hu> |
Tue, 15 Mar 2011 19:32:21 +0100 | |
changeset 936 | ddd3c0d3d9bf |
parent 917 | 4980b05606bd |
parent 927 | 16d466589b54 |
child 939 | 78b9fb1f4454 |
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 |
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@512 | 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 |
thoneyvazul@916 | 34 |
max_cardinality_search_test |
kpeter@904 | 35 |
max_clique_test |
deba@490 | 36 |
min_cost_arborescence_test |
kpeter@601 | 37 |
min_cost_flow_test |
kpeter@763 | 38 |
min_mean_cycle_test |
deba@913 | 39 |
nagamochi_ibaraki_test |
alpar@424 | 40 |
path_test |
deba@797 | 41 |
planarity_test |
alpar@424 | 42 |
preflow_test |
ladanyi@473 | 43 |
radix_sort_test |
alpar@225 | 44 |
random_test |
alpar@424 | 45 |
suurballe_test |
ladanyi@141 | 46 |
time_measure_test |
ladanyi@679 | 47 |
unionfind_test |
ladanyi@679 | 48 |
) |
ladanyi@141 | 49 |
|
ladanyi@627 | 50 |
IF(LEMON_HAVE_LP) |
alpar@927 | 51 |
IF(${CMAKE_BUILD_TYPE} STREQUAL "Maintainer") |
alpar@927 | 52 |
ADD_EXECUTABLE(lp_test lp_test.cc) |
alpar@927 | 53 |
ELSE() |
alpar@927 | 54 |
ADD_EXECUTABLE(lp_test EXCLUDE_FROM_ALL lp_test.cc) |
alpar@927 | 55 |
ENDIF() |
alpar@927 | 56 |
|
ladanyi@620 | 57 |
SET(LP_TEST_LIBS lemon) |
ladanyi@679 | 58 |
|
ladanyi@627 | 59 |
IF(LEMON_HAVE_GLPK) |
ladanyi@620 | 60 |
SET(LP_TEST_LIBS ${LP_TEST_LIBS} ${GLPK_LIBRARIES}) |
ladanyi@679 | 61 |
ENDIF() |
ladanyi@627 | 62 |
IF(LEMON_HAVE_CPLEX) |
ladanyi@620 | 63 |
SET(LP_TEST_LIBS ${LP_TEST_LIBS} ${CPLEX_LIBRARIES}) |
ladanyi@679 | 64 |
ENDIF() |
ladanyi@627 | 65 |
IF(LEMON_HAVE_CLP) |
ladanyi@621 | 66 |
SET(LP_TEST_LIBS ${LP_TEST_LIBS} ${COIN_CLP_LIBRARIES}) |
ladanyi@679 | 67 |
ENDIF() |
ladanyi@679 | 68 |
|
ladanyi@620 | 69 |
TARGET_LINK_LIBRARIES(lp_test ${LP_TEST_LIBS}) |
ladanyi@473 | 70 |
ADD_TEST(lp_test lp_test) |
ladanyi@473 | 71 |
|
ladanyi@627 | 72 |
IF(WIN32 AND LEMON_HAVE_GLPK) |
ladanyi@473 | 73 |
GET_TARGET_PROPERTY(TARGET_LOC lp_test LOCATION) |
ladanyi@473 | 74 |
GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH) |
ladanyi@473 | 75 |
ADD_CUSTOM_COMMAND(TARGET lp_test POST_BUILD |
ladanyi@679 | 76 |
COMMAND ${CMAKE_COMMAND} -E copy ${GLPK_BIN_DIR}/glpk.dll ${TARGET_PATH} |
ladanyi@679 | 77 |
COMMAND ${CMAKE_COMMAND} -E copy ${GLPK_BIN_DIR}/libltdl3.dll ${TARGET_PATH} |
ladanyi@679 | 78 |
COMMAND ${CMAKE_COMMAND} -E copy ${GLPK_BIN_DIR}/zlib1.dll ${TARGET_PATH} |
ladanyi@473 | 79 |
) |
ladanyi@679 | 80 |
ENDIF() |
ladanyi@679 | 81 |
|
ladanyi@627 | 82 |
IF(WIN32 AND LEMON_HAVE_CPLEX) |
ladanyi@620 | 83 |
GET_TARGET_PROPERTY(TARGET_LOC lp_test LOCATION) |
ladanyi@620 | 84 |
GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH) |
ladanyi@620 | 85 |
ADD_CUSTOM_COMMAND(TARGET lp_test POST_BUILD |
ladanyi@679 | 86 |
COMMAND ${CMAKE_COMMAND} -E copy ${CPLEX_BIN_DIR}/cplex91.dll ${TARGET_PATH} |
ladanyi@620 | 87 |
) |
ladanyi@679 | 88 |
ENDIF() |
ladanyi@679 | 89 |
ENDIF() |
ladanyi@473 | 90 |
|
ladanyi@627 | 91 |
IF(LEMON_HAVE_MIP) |
alpar@927 | 92 |
IF(${CMAKE_BUILD_TYPE} STREQUAL "Maintainer") |
alpar@927 | 93 |
ADD_EXECUTABLE(mip_test mip_test.cc) |
alpar@927 | 94 |
ELSE() |
alpar@927 | 95 |
ADD_EXECUTABLE(mip_test EXCLUDE_FROM_ALL mip_test.cc) |
alpar@927 | 96 |
ENDIF() |
alpar@927 | 97 |
|
ladanyi@620 | 98 |
SET(MIP_TEST_LIBS lemon) |
ladanyi@679 | 99 |
|
ladanyi@627 | 100 |
IF(LEMON_HAVE_GLPK) |
ladanyi@620 | 101 |
SET(MIP_TEST_LIBS ${MIP_TEST_LIBS} ${GLPK_LIBRARIES}) |
ladanyi@679 | 102 |
ENDIF() |
ladanyi@627 | 103 |
IF(LEMON_HAVE_CPLEX) |
ladanyi@620 | 104 |
SET(MIP_TEST_LIBS ${MIP_TEST_LIBS} ${CPLEX_LIBRARIES}) |
ladanyi@679 | 105 |
ENDIF() |
ladanyi@627 | 106 |
IF(LEMON_HAVE_CBC) |
ladanyi@621 | 107 |
SET(MIP_TEST_LIBS ${MIP_TEST_LIBS} ${COIN_CBC_LIBRARIES}) |
ladanyi@679 | 108 |
ENDIF() |
ladanyi@679 | 109 |
|
ladanyi@620 | 110 |
TARGET_LINK_LIBRARIES(mip_test ${MIP_TEST_LIBS}) |
ladanyi@473 | 111 |
ADD_TEST(mip_test mip_test) |
ladanyi@473 | 112 |
|
ladanyi@627 | 113 |
IF(WIN32 AND LEMON_HAVE_GLPK) |
ladanyi@473 | 114 |
GET_TARGET_PROPERTY(TARGET_LOC mip_test LOCATION) |
ladanyi@473 | 115 |
GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH) |
ladanyi@473 | 116 |
ADD_CUSTOM_COMMAND(TARGET mip_test POST_BUILD |
ladanyi@679 | 117 |
COMMAND ${CMAKE_COMMAND} -E copy ${GLPK_BIN_DIR}/glpk.dll ${TARGET_PATH} |
ladanyi@679 | 118 |
COMMAND ${CMAKE_COMMAND} -E copy ${GLPK_BIN_DIR}/libltdl3.dll ${TARGET_PATH} |
ladanyi@679 | 119 |
COMMAND ${CMAKE_COMMAND} -E copy ${GLPK_BIN_DIR}/zlib1.dll ${TARGET_PATH} |
ladanyi@473 | 120 |
) |
ladanyi@679 | 121 |
ENDIF() |
ladanyi@679 | 122 |
|
ladanyi@627 | 123 |
IF(WIN32 AND LEMON_HAVE_CPLEX) |
ladanyi@620 | 124 |
GET_TARGET_PROPERTY(TARGET_LOC mip_test LOCATION) |
ladanyi@620 | 125 |
GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH) |
ladanyi@620 | 126 |
ADD_CUSTOM_COMMAND(TARGET mip_test POST_BUILD |
ladanyi@679 | 127 |
COMMAND ${CMAKE_COMMAND} -E copy ${CPLEX_BIN_DIR}/cplex91.dll ${TARGET_PATH} |
ladanyi@620 | 128 |
) |
ladanyi@679 | 129 |
ENDIF() |
ladanyi@679 | 130 |
ENDIF() |
ladanyi@473 | 131 |
|
alpar@225 | 132 |
FOREACH(TEST_NAME ${TESTS}) |
alpar@927 | 133 |
IF(${CMAKE_BUILD_TYPE} STREQUAL "Maintainer") |
alpar@927 | 134 |
ADD_EXECUTABLE(${TEST_NAME} ${TEST_NAME}.cc) |
alpar@927 | 135 |
ELSE() |
alpar@927 | 136 |
ADD_EXECUTABLE(${TEST_NAME} EXCLUDE_FROM_ALL ${TEST_NAME}.cc) |
alpar@927 | 137 |
ENDIF() |
alpar@225 | 138 |
TARGET_LINK_LIBRARIES(${TEST_NAME} lemon) |
alpar@225 | 139 |
ADD_TEST(${TEST_NAME} ${TEST_NAME}) |
alpar@927 | 140 |
ADD_DEPENDENCIES(check ${TEST_NAME}) |
ladanyi@679 | 141 |
ENDFOREACH() |