COIN-OR::LEMON - Graph Library

source: lemon-main/test/CMakeLists.txt @ 764:1fac515a59c1

Last change on this file since 764:1fac515a59c1 was 763:93cd93e82f9b, checked in by Peter Kovacs <kpeter@…>, 15 years ago

Add a detailed test file for MinMeanCycle? and fix test_tools.h (#179)

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