COIN-OR::LEMON - Graph Library

source: lemon-main/test/CMakeLists.txt @ 870:61120524af27

Last change on this file since 870:61120524af27 was 869:636dadefe1e6, checked in by Balazs Dezso <deba@…>, 15 years ago

Add fractional matching algorithms (#314)

File size: 3.1 KB
RevLine 
[510]1INCLUDE_DIRECTORIES(
[549]2  ${PROJECT_SOURCE_DIR}
[510]3  ${PROJECT_BINARY_DIR}
4)
[141]5
[679]6LINK_DIRECTORIES(
7  ${PROJECT_BINARY_DIR}/lemon
8)
[141]9
[225]10SET(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
[501]34  min_cost_arborescence_test
[601]35  min_cost_flow_test
[424]36  path_test
37  preflow_test
[473]38  radix_sort_test
[225]39  random_test
[424]40  suurballe_test
[141]41  time_measure_test
[679]42  unionfind_test
43)
[141]44
[627]45IF(LEMON_HAVE_LP)
[473]46  ADD_EXECUTABLE(lp_test lp_test.cc)
[620]47  SET(LP_TEST_LIBS lemon)
[679]48
[627]49  IF(LEMON_HAVE_GLPK)
[620]50    SET(LP_TEST_LIBS ${LP_TEST_LIBS} ${GLPK_LIBRARIES})
[679]51  ENDIF()
[627]52  IF(LEMON_HAVE_CPLEX)
[620]53    SET(LP_TEST_LIBS ${LP_TEST_LIBS} ${CPLEX_LIBRARIES})
[679]54  ENDIF()
[627]55  IF(LEMON_HAVE_CLP)
[621]56    SET(LP_TEST_LIBS ${LP_TEST_LIBS} ${COIN_CLP_LIBRARIES})
[679]57  ENDIF()
58
[620]59  TARGET_LINK_LIBRARIES(lp_test ${LP_TEST_LIBS})
[473]60  ADD_TEST(lp_test lp_test)
61
[627]62  IF(WIN32 AND LEMON_HAVE_GLPK)
[473]63    GET_TARGET_PROPERTY(TARGET_LOC lp_test LOCATION)
64    GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH)
65    ADD_CUSTOM_COMMAND(TARGET lp_test POST_BUILD
[679]66      COMMAND ${CMAKE_COMMAND} -E copy ${GLPK_BIN_DIR}/glpk.dll ${TARGET_PATH}
67      COMMAND ${CMAKE_COMMAND} -E copy ${GLPK_BIN_DIR}/libltdl3.dll ${TARGET_PATH}
68      COMMAND ${CMAKE_COMMAND} -E copy ${GLPK_BIN_DIR}/zlib1.dll ${TARGET_PATH}
[473]69    )
[679]70  ENDIF()
71
[627]72  IF(WIN32 AND LEMON_HAVE_CPLEX)
[620]73    GET_TARGET_PROPERTY(TARGET_LOC lp_test LOCATION)
74    GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH)
75    ADD_CUSTOM_COMMAND(TARGET lp_test POST_BUILD
[679]76      COMMAND ${CMAKE_COMMAND} -E copy ${CPLEX_BIN_DIR}/cplex91.dll ${TARGET_PATH}
[620]77    )
[679]78  ENDIF()
79ENDIF()
[473]80
[627]81IF(LEMON_HAVE_MIP)
[473]82  ADD_EXECUTABLE(mip_test mip_test.cc)
[620]83  SET(MIP_TEST_LIBS lemon)
[679]84
[627]85  IF(LEMON_HAVE_GLPK)
[620]86    SET(MIP_TEST_LIBS ${MIP_TEST_LIBS} ${GLPK_LIBRARIES})
[679]87  ENDIF()
[627]88  IF(LEMON_HAVE_CPLEX)
[620]89    SET(MIP_TEST_LIBS ${MIP_TEST_LIBS} ${CPLEX_LIBRARIES})
[679]90  ENDIF()
[627]91  IF(LEMON_HAVE_CBC)
[621]92    SET(MIP_TEST_LIBS ${MIP_TEST_LIBS} ${COIN_CBC_LIBRARIES})
[679]93  ENDIF()
94
[620]95  TARGET_LINK_LIBRARIES(mip_test ${MIP_TEST_LIBS})
[473]96  ADD_TEST(mip_test mip_test)
97
[627]98  IF(WIN32 AND LEMON_HAVE_GLPK)
[473]99    GET_TARGET_PROPERTY(TARGET_LOC mip_test LOCATION)
100    GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH)
101    ADD_CUSTOM_COMMAND(TARGET mip_test POST_BUILD
[679]102      COMMAND ${CMAKE_COMMAND} -E copy ${GLPK_BIN_DIR}/glpk.dll ${TARGET_PATH}
103      COMMAND ${CMAKE_COMMAND} -E copy ${GLPK_BIN_DIR}/libltdl3.dll ${TARGET_PATH}
104      COMMAND ${CMAKE_COMMAND} -E copy ${GLPK_BIN_DIR}/zlib1.dll ${TARGET_PATH}
[473]105    )
[679]106  ENDIF()
107
[627]108  IF(WIN32 AND LEMON_HAVE_CPLEX)
[620]109    GET_TARGET_PROPERTY(TARGET_LOC mip_test LOCATION)
110    GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH)
111    ADD_CUSTOM_COMMAND(TARGET mip_test POST_BUILD
[679]112      COMMAND ${CMAKE_COMMAND} -E copy ${CPLEX_BIN_DIR}/cplex91.dll ${TARGET_PATH}
[620]113    )
[679]114  ENDIF()
115ENDIF()
[473]116
[225]117FOREACH(TEST_NAME ${TESTS})
118  ADD_EXECUTABLE(${TEST_NAME} ${TEST_NAME}.cc)
119  TARGET_LINK_LIBRARIES(${TEST_NAME} lemon)
120  ADD_TEST(${TEST_NAME} ${TEST_NAME})
[679]121ENDFOREACH()
Note: See TracBrowser for help on using the repository browser.