COIN-OR::LEMON - Graph Library

source: lemon-main/test/CMakeLists.txt @ 663:8b0df68370a4

Last change on this file since 663:8b0df68370a4 was 649:76cbcb3e9bbb, checked in by Peter Kovacs <kpeter@…>, 16 years ago

Add a test file for the connectivity functions (#285)
The Euler tools have a separate test file.

File size: 3.2 KB
RevLine 
[510]1INCLUDE_DIRECTORIES(
[549]2  ${PROJECT_SOURCE_DIR}
[510]3  ${PROJECT_BINARY_DIR}
4)
[141]5
[549]6LINK_DIRECTORIES(${PROJECT_BINARY_DIR}/lemon)
[141]7
[225]8SET(TESTS
[488]9  adaptors_test
[141]10  bfs_test
[424]11  circulation_test
[649]12  connectivity_test
[141]13  counter_test
14  dfs_test
15  digraph_test
[170]16  dijkstra_test
[141]17  dim_test
[488]18  edge_set_test
[141]19  error_test
[522]20  euler_test
[543]21  gomory_hu_test
[200]22  graph_copy_test
[141]23  graph_test
[171]24  graph_utils_test
[410]25  hao_orlin_test
[203]26  heap_test
[141]27  kruskal_test
28  maps_test
[594]29  matching_test
[501]30  min_cost_arborescence_test
[601]31  min_cost_flow_test
[424]32  path_test
33  preflow_test
[473]34  radix_sort_test
[225]35  random_test
[424]36  suurballe_test
[141]37  time_measure_test
38  unionfind_test)
39
[627]40IF(LEMON_HAVE_LP)
[473]41  ADD_EXECUTABLE(lp_test lp_test.cc)
[620]42  SET(LP_TEST_LIBS lemon)
[627]43  IF(LEMON_HAVE_GLPK)
[620]44    SET(LP_TEST_LIBS ${LP_TEST_LIBS} ${GLPK_LIBRARIES})
[627]45  ENDIF(LEMON_HAVE_GLPK)
46  IF(LEMON_HAVE_CPLEX)
[620]47    SET(LP_TEST_LIBS ${LP_TEST_LIBS} ${CPLEX_LIBRARIES})
[627]48  ENDIF(LEMON_HAVE_CPLEX)
49  IF(LEMON_HAVE_CLP)
[621]50    SET(LP_TEST_LIBS ${LP_TEST_LIBS} ${COIN_CLP_LIBRARIES})
[627]51  ENDIF(LEMON_HAVE_CLP)
[620]52  TARGET_LINK_LIBRARIES(lp_test ${LP_TEST_LIBS})
[473]53  ADD_TEST(lp_test lp_test)
54
[627]55  IF(WIN32 AND LEMON_HAVE_GLPK)
[473]56    GET_TARGET_PROPERTY(TARGET_LOC lp_test LOCATION)
57    GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH)
58    ADD_CUSTOM_COMMAND(TARGET lp_test POST_BUILD
59      COMMAND cmake -E copy ${GLPK_BIN_DIR}/glpk.dll ${TARGET_PATH}
60      COMMAND cmake -E copy ${GLPK_BIN_DIR}/libltdl3.dll ${TARGET_PATH}
61      COMMAND cmake -E copy ${GLPK_BIN_DIR}/zlib1.dll ${TARGET_PATH}
62    )
[627]63  ENDIF(WIN32 AND LEMON_HAVE_GLPK)
64  IF(WIN32 AND LEMON_HAVE_CPLEX)
[620]65    GET_TARGET_PROPERTY(TARGET_LOC lp_test LOCATION)
66    GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH)
67    ADD_CUSTOM_COMMAND(TARGET lp_test POST_BUILD
68      COMMAND cmake -E copy ${CPLEX_BIN_DIR}/cplex91.dll ${TARGET_PATH}
69    )
[627]70  ENDIF(WIN32 AND LEMON_HAVE_CPLEX)
71ENDIF(LEMON_HAVE_LP)
[473]72
[627]73IF(LEMON_HAVE_MIP)
[473]74  ADD_EXECUTABLE(mip_test mip_test.cc)
[620]75  SET(MIP_TEST_LIBS lemon)
[627]76  IF(LEMON_HAVE_GLPK)
[620]77    SET(MIP_TEST_LIBS ${MIP_TEST_LIBS} ${GLPK_LIBRARIES})
[627]78  ENDIF(LEMON_HAVE_GLPK)
79  IF(LEMON_HAVE_CPLEX)
[620]80    SET(MIP_TEST_LIBS ${MIP_TEST_LIBS} ${CPLEX_LIBRARIES})
[627]81  ENDIF(LEMON_HAVE_CPLEX)
82  IF(LEMON_HAVE_CBC)
[621]83    SET(MIP_TEST_LIBS ${MIP_TEST_LIBS} ${COIN_CBC_LIBRARIES})
[627]84  ENDIF(LEMON_HAVE_CBC)
[620]85  TARGET_LINK_LIBRARIES(mip_test ${MIP_TEST_LIBS})
[473]86  ADD_TEST(mip_test mip_test)
87
[627]88  IF(WIN32 AND LEMON_HAVE_GLPK)
[473]89    GET_TARGET_PROPERTY(TARGET_LOC mip_test LOCATION)
90    GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH)
91    ADD_CUSTOM_COMMAND(TARGET mip_test POST_BUILD
92      COMMAND cmake -E copy ${GLPK_BIN_DIR}/glpk.dll ${TARGET_PATH}
93      COMMAND cmake -E copy ${GLPK_BIN_DIR}/libltdl3.dll ${TARGET_PATH}
94      COMMAND cmake -E copy ${GLPK_BIN_DIR}/zlib1.dll ${TARGET_PATH}
95    )
[627]96  ENDIF(WIN32 AND LEMON_HAVE_GLPK)
97  IF(WIN32 AND LEMON_HAVE_CPLEX)
[620]98    GET_TARGET_PROPERTY(TARGET_LOC mip_test LOCATION)
99    GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH)
100    ADD_CUSTOM_COMMAND(TARGET mip_test POST_BUILD
101      COMMAND cmake -E copy ${CPLEX_BIN_DIR}/cplex91.dll ${TARGET_PATH}
102    )
[627]103  ENDIF(WIN32 AND LEMON_HAVE_CPLEX)
104ENDIF(LEMON_HAVE_MIP)
[473]105
[225]106FOREACH(TEST_NAME ${TESTS})
107  ADD_EXECUTABLE(${TEST_NAME} ${TEST_NAME}.cc)
108  TARGET_LINK_LIBRARIES(${TEST_NAME} lemon)
109  ADD_TEST(${TEST_NAME} ${TEST_NAME})
110ENDFOREACH(TEST_NAME)
Note: See TracBrowser for help on using the repository browser.