author | Alpar Juttner <alpar@cs.elte.hu> |
Fri, 04 Mar 2011 10:31:12 +0100 | |
changeset 1037 | d3b041452dd8 |
parent 726 | 9c7639f3a741 |
child 1035 | d149eaf24638 |
child 1040 | 8e39ccaabf48 |
child 1044 | 66156a3498ea |
permissions | -rw-r--r-- |
ladanyi@539 | 1 |
INCLUDE_DIRECTORIES( |
ladanyi@596 | 2 |
${PROJECT_SOURCE_DIR} |
ladanyi@539 | 3 |
${PROJECT_BINARY_DIR} |
ladanyi@539 | 4 |
) |
ladanyi@141 | 5 |
|
ladanyi@726 | 6 |
LINK_DIRECTORIES( |
ladanyi@726 | 7 |
${PROJECT_BINARY_DIR}/lemon |
ladanyi@726 | 8 |
) |
ladanyi@141 | 9 |
|
alpar@225 | 10 |
SET(TESTS |
deba@559 | 11 |
adaptors_test |
ladanyi@141 | 12 |
bfs_test |
alpar@443 | 13 |
circulation_test |
kpeter@696 | 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@559 | 20 |
edge_set_test |
ladanyi@141 | 21 |
error_test |
ladanyi@569 | 22 |
euler_test |
tapolcai@590 | 23 |
gomory_hu_test |
deba@200 | 24 |
graph_copy_test |
ladanyi@141 | 25 |
graph_test |
kpeter@171 | 26 |
graph_utils_test |
deba@426 | 27 |
hao_orlin_test |
deba@203 | 28 |
heap_test |
ladanyi@141 | 29 |
kruskal_test |
ladanyi@141 | 30 |
maps_test |
kpeter@641 | 31 |
matching_test |
deba@522 | 32 |
min_cost_arborescence_test |
kpeter@648 | 33 |
min_cost_flow_test |
alpar@443 | 34 |
path_test |
alpar@443 | 35 |
preflow_test |
ladanyi@496 | 36 |
radix_sort_test |
alpar@225 | 37 |
random_test |
alpar@443 | 38 |
suurballe_test |
ladanyi@141 | 39 |
time_measure_test |
ladanyi@726 | 40 |
unionfind_test |
ladanyi@726 | 41 |
) |
ladanyi@141 | 42 |
|
ladanyi@674 | 43 |
IF(LEMON_HAVE_LP) |
alpar@1033 | 44 |
IF(${CMAKE_BUILD_TYPE} STREQUAL "Maintainer") |
alpar@1033 | 45 |
ADD_EXECUTABLE(lp_test lp_test.cc) |
alpar@1033 | 46 |
ELSE() |
alpar@1033 | 47 |
ADD_EXECUTABLE(lp_test EXCLUDE_FROM_ALL lp_test.cc) |
alpar@1033 | 48 |
ENDIF() |
alpar@1033 | 49 |
|
ladanyi@667 | 50 |
SET(LP_TEST_LIBS lemon) |
ladanyi@726 | 51 |
|
ladanyi@674 | 52 |
IF(LEMON_HAVE_GLPK) |
ladanyi@667 | 53 |
SET(LP_TEST_LIBS ${LP_TEST_LIBS} ${GLPK_LIBRARIES}) |
ladanyi@726 | 54 |
ENDIF() |
ladanyi@674 | 55 |
IF(LEMON_HAVE_CPLEX) |
ladanyi@667 | 56 |
SET(LP_TEST_LIBS ${LP_TEST_LIBS} ${CPLEX_LIBRARIES}) |
ladanyi@726 | 57 |
ENDIF() |
ladanyi@674 | 58 |
IF(LEMON_HAVE_CLP) |
ladanyi@668 | 59 |
SET(LP_TEST_LIBS ${LP_TEST_LIBS} ${COIN_CLP_LIBRARIES}) |
ladanyi@726 | 60 |
ENDIF() |
ladanyi@726 | 61 |
|
ladanyi@667 | 62 |
TARGET_LINK_LIBRARIES(lp_test ${LP_TEST_LIBS}) |
ladanyi@496 | 63 |
ADD_TEST(lp_test lp_test) |
ladanyi@496 | 64 |
|
ladanyi@674 | 65 |
IF(WIN32 AND LEMON_HAVE_GLPK) |
ladanyi@496 | 66 |
GET_TARGET_PROPERTY(TARGET_LOC lp_test LOCATION) |
ladanyi@496 | 67 |
GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH) |
ladanyi@496 | 68 |
ADD_CUSTOM_COMMAND(TARGET lp_test POST_BUILD |
ladanyi@726 | 69 |
COMMAND ${CMAKE_COMMAND} -E copy ${GLPK_BIN_DIR}/glpk.dll ${TARGET_PATH} |
ladanyi@726 | 70 |
COMMAND ${CMAKE_COMMAND} -E copy ${GLPK_BIN_DIR}/libltdl3.dll ${TARGET_PATH} |
ladanyi@726 | 71 |
COMMAND ${CMAKE_COMMAND} -E copy ${GLPK_BIN_DIR}/zlib1.dll ${TARGET_PATH} |
ladanyi@496 | 72 |
) |
ladanyi@726 | 73 |
ENDIF() |
ladanyi@726 | 74 |
|
ladanyi@674 | 75 |
IF(WIN32 AND LEMON_HAVE_CPLEX) |
ladanyi@667 | 76 |
GET_TARGET_PROPERTY(TARGET_LOC lp_test LOCATION) |
ladanyi@667 | 77 |
GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH) |
ladanyi@667 | 78 |
ADD_CUSTOM_COMMAND(TARGET lp_test POST_BUILD |
ladanyi@726 | 79 |
COMMAND ${CMAKE_COMMAND} -E copy ${CPLEX_BIN_DIR}/cplex91.dll ${TARGET_PATH} |
ladanyi@667 | 80 |
) |
ladanyi@726 | 81 |
ENDIF() |
ladanyi@726 | 82 |
ENDIF() |
ladanyi@496 | 83 |
|
ladanyi@674 | 84 |
IF(LEMON_HAVE_MIP) |
alpar@1033 | 85 |
IF(${CMAKE_BUILD_TYPE} STREQUAL "Maintainer") |
alpar@1033 | 86 |
ADD_EXECUTABLE(mip_test mip_test.cc) |
alpar@1033 | 87 |
ELSE() |
alpar@1033 | 88 |
ADD_EXECUTABLE(mip_test EXCLUDE_FROM_ALL mip_test.cc) |
alpar@1033 | 89 |
ENDIF() |
alpar@1033 | 90 |
|
ladanyi@667 | 91 |
SET(MIP_TEST_LIBS lemon) |
ladanyi@726 | 92 |
|
ladanyi@674 | 93 |
IF(LEMON_HAVE_GLPK) |
ladanyi@667 | 94 |
SET(MIP_TEST_LIBS ${MIP_TEST_LIBS} ${GLPK_LIBRARIES}) |
ladanyi@726 | 95 |
ENDIF() |
ladanyi@674 | 96 |
IF(LEMON_HAVE_CPLEX) |
ladanyi@667 | 97 |
SET(MIP_TEST_LIBS ${MIP_TEST_LIBS} ${CPLEX_LIBRARIES}) |
ladanyi@726 | 98 |
ENDIF() |
ladanyi@674 | 99 |
IF(LEMON_HAVE_CBC) |
ladanyi@668 | 100 |
SET(MIP_TEST_LIBS ${MIP_TEST_LIBS} ${COIN_CBC_LIBRARIES}) |
ladanyi@726 | 101 |
ENDIF() |
ladanyi@726 | 102 |
|
ladanyi@667 | 103 |
TARGET_LINK_LIBRARIES(mip_test ${MIP_TEST_LIBS}) |
ladanyi@496 | 104 |
ADD_TEST(mip_test mip_test) |
ladanyi@496 | 105 |
|
ladanyi@674 | 106 |
IF(WIN32 AND LEMON_HAVE_GLPK) |
ladanyi@496 | 107 |
GET_TARGET_PROPERTY(TARGET_LOC mip_test LOCATION) |
ladanyi@496 | 108 |
GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH) |
ladanyi@496 | 109 |
ADD_CUSTOM_COMMAND(TARGET mip_test POST_BUILD |
ladanyi@726 | 110 |
COMMAND ${CMAKE_COMMAND} -E copy ${GLPK_BIN_DIR}/glpk.dll ${TARGET_PATH} |
ladanyi@726 | 111 |
COMMAND ${CMAKE_COMMAND} -E copy ${GLPK_BIN_DIR}/libltdl3.dll ${TARGET_PATH} |
ladanyi@726 | 112 |
COMMAND ${CMAKE_COMMAND} -E copy ${GLPK_BIN_DIR}/zlib1.dll ${TARGET_PATH} |
ladanyi@496 | 113 |
) |
ladanyi@726 | 114 |
ENDIF() |
ladanyi@726 | 115 |
|
ladanyi@674 | 116 |
IF(WIN32 AND LEMON_HAVE_CPLEX) |
ladanyi@667 | 117 |
GET_TARGET_PROPERTY(TARGET_LOC mip_test LOCATION) |
ladanyi@667 | 118 |
GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH) |
ladanyi@667 | 119 |
ADD_CUSTOM_COMMAND(TARGET mip_test POST_BUILD |
ladanyi@726 | 120 |
COMMAND ${CMAKE_COMMAND} -E copy ${CPLEX_BIN_DIR}/cplex91.dll ${TARGET_PATH} |
ladanyi@667 | 121 |
) |
ladanyi@726 | 122 |
ENDIF() |
ladanyi@726 | 123 |
ENDIF() |
ladanyi@496 | 124 |
|
alpar@225 | 125 |
FOREACH(TEST_NAME ${TESTS}) |
alpar@1033 | 126 |
IF(${CMAKE_BUILD_TYPE} STREQUAL "Maintainer") |
alpar@1033 | 127 |
ADD_EXECUTABLE(${TEST_NAME} ${TEST_NAME}.cc) |
alpar@1033 | 128 |
ELSE() |
alpar@1033 | 129 |
ADD_EXECUTABLE(${TEST_NAME} EXCLUDE_FROM_ALL ${TEST_NAME}.cc) |
alpar@1033 | 130 |
ENDIF() |
alpar@225 | 131 |
TARGET_LINK_LIBRARIES(${TEST_NAME} lemon) |
alpar@225 | 132 |
ADD_TEST(${TEST_NAME} ${TEST_NAME}) |
alpar@1033 | 133 |
ADD_DEPENDENCIES(check ${TEST_NAME}) |
ladanyi@726 | 134 |
ENDFOREACH() |