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