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