COIN-OR::LEMON - Graph Library

source: lemon-main/test/CMakeLists.txt @ 859:ac5f72c48367

Last change on this file since 859:ac5f72c48367 was 799:6be1f9bd2ac0, checked in by Alpar Juttner <alpar@…>, 15 years ago

Merge #62

File size: 3.2 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
[543]24  gomory_hu_test
[200]25  graph_copy_test
[141]26  graph_test
[171]27  graph_utils_test
[410]28  hao_orlin_test
[203]29  heap_test
[141]30  kruskal_test
31  maps_test
[594]32  matching_test
[501]33  min_cost_arborescence_test
[601]34  min_cost_flow_test
[763]35  min_mean_cycle_test
[424]36  path_test
[797]37  planarity_test
[424]38  preflow_test
[473]39  radix_sort_test
[225]40  random_test
[424]41  suurballe_test
[141]42  time_measure_test
[679]43  unionfind_test
44)
[141]45
[627]46IF(LEMON_HAVE_LP)
[473]47  ADD_EXECUTABLE(lp_test lp_test.cc)
[620]48  SET(LP_TEST_LIBS lemon)
[679]49
[627]50  IF(LEMON_HAVE_GLPK)
[620]51    SET(LP_TEST_LIBS ${LP_TEST_LIBS} ${GLPK_LIBRARIES})
[679]52  ENDIF()
[627]53  IF(LEMON_HAVE_CPLEX)
[620]54    SET(LP_TEST_LIBS ${LP_TEST_LIBS} ${CPLEX_LIBRARIES})
[679]55  ENDIF()
[627]56  IF(LEMON_HAVE_CLP)
[621]57    SET(LP_TEST_LIBS ${LP_TEST_LIBS} ${COIN_CLP_LIBRARIES})
[679]58  ENDIF()
59
[620]60  TARGET_LINK_LIBRARIES(lp_test ${LP_TEST_LIBS})
[473]61  ADD_TEST(lp_test lp_test)
62
[627]63  IF(WIN32 AND LEMON_HAVE_GLPK)
[473]64    GET_TARGET_PROPERTY(TARGET_LOC lp_test LOCATION)
65    GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH)
66    ADD_CUSTOM_COMMAND(TARGET lp_test POST_BUILD
[679]67      COMMAND ${CMAKE_COMMAND} -E copy ${GLPK_BIN_DIR}/glpk.dll ${TARGET_PATH}
68      COMMAND ${CMAKE_COMMAND} -E copy ${GLPK_BIN_DIR}/libltdl3.dll ${TARGET_PATH}
69      COMMAND ${CMAKE_COMMAND} -E copy ${GLPK_BIN_DIR}/zlib1.dll ${TARGET_PATH}
[473]70    )
[679]71  ENDIF()
72
[627]73  IF(WIN32 AND LEMON_HAVE_CPLEX)
[620]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 ${CPLEX_BIN_DIR}/cplex91.dll ${TARGET_PATH}
[620]78    )
[679]79  ENDIF()
80ENDIF()
[473]81
[627]82IF(LEMON_HAVE_MIP)
[473]83  ADD_EXECUTABLE(mip_test mip_test.cc)
[620]84  SET(MIP_TEST_LIBS lemon)
[679]85
[627]86  IF(LEMON_HAVE_GLPK)
[620]87    SET(MIP_TEST_LIBS ${MIP_TEST_LIBS} ${GLPK_LIBRARIES})
[679]88  ENDIF()
[627]89  IF(LEMON_HAVE_CPLEX)
[620]90    SET(MIP_TEST_LIBS ${MIP_TEST_LIBS} ${CPLEX_LIBRARIES})
[679]91  ENDIF()
[627]92  IF(LEMON_HAVE_CBC)
[621]93    SET(MIP_TEST_LIBS ${MIP_TEST_LIBS} ${COIN_CBC_LIBRARIES})
[679]94  ENDIF()
95
[620]96  TARGET_LINK_LIBRARIES(mip_test ${MIP_TEST_LIBS})
[473]97  ADD_TEST(mip_test mip_test)
98
[627]99  IF(WIN32 AND LEMON_HAVE_GLPK)
[473]100    GET_TARGET_PROPERTY(TARGET_LOC mip_test LOCATION)
101    GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH)
102    ADD_CUSTOM_COMMAND(TARGET mip_test POST_BUILD
[679]103      COMMAND ${CMAKE_COMMAND} -E copy ${GLPK_BIN_DIR}/glpk.dll ${TARGET_PATH}
104      COMMAND ${CMAKE_COMMAND} -E copy ${GLPK_BIN_DIR}/libltdl3.dll ${TARGET_PATH}
105      COMMAND ${CMAKE_COMMAND} -E copy ${GLPK_BIN_DIR}/zlib1.dll ${TARGET_PATH}
[473]106    )
[679]107  ENDIF()
108
[627]109  IF(WIN32 AND LEMON_HAVE_CPLEX)
[620]110    GET_TARGET_PROPERTY(TARGET_LOC mip_test LOCATION)
111    GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH)
112    ADD_CUSTOM_COMMAND(TARGET mip_test POST_BUILD
[679]113      COMMAND ${CMAKE_COMMAND} -E copy ${CPLEX_BIN_DIR}/cplex91.dll ${TARGET_PATH}
[620]114    )
[679]115  ENDIF()
116ENDIF()
[473]117
[225]118FOREACH(TEST_NAME ${TESTS})
119  ADD_EXECUTABLE(${TEST_NAME} ${TEST_NAME}.cc)
120  TARGET_LINK_LIBRARIES(${TEST_NAME} lemon)
121  ADD_TEST(${TEST_NAME} ${TEST_NAME})
[679]122ENDFOREACH()
Note: See TracBrowser for help on using the repository browser.