COIN-OR::LEMON - Graph Library

source: lemon-main/test/CMakeLists.txt @ 540:9db62975c32b

Last change on this file since 540:9db62975c32b was 528:88bd39ef7d98, checked in by Alpar Juttner <alpar@…>, 16 years ago

Merge

File size: 2.0 KB
RevLine 
[473]1INCLUDE_DIRECTORIES(
2  ${CMAKE_SOURCE_DIR}
3  ${CMAKE_BINARY_DIR}
4)
[410]5
[474]6IF(HAVE_GLPK)
7  INCLUDE_DIRECTORIES(${GLPK_INCLUDE_DIR})
8ENDIF(HAVE_GLPK)
[141]9
[225]10LINK_DIRECTORIES(${CMAKE_BINARY_DIR}/lemon)
[141]11
[225]12SET(TESTS
[488]13  adaptors_test
[141]14  bfs_test
[424]15  circulation_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
[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
[326]31  max_matching_test
[501]32  min_cost_arborescence_test
[424]33  path_test
34  preflow_test
[473]35  radix_sort_test
[225]36  random_test
[424]37  suurballe_test
[141]38  time_measure_test
39  unionfind_test)
40
[473]41IF(HAVE_LP)
42  ADD_EXECUTABLE(lp_test lp_test.cc)
[474]43  IF(HAVE_GLPK)
44    TARGET_LINK_LIBRARIES(lp_test lemon ${GLPK_LIBRARIES})
45  ENDIF(HAVE_GLPK)
[473]46  ADD_TEST(lp_test lp_test)
47
[474]48  IF(WIN32 AND HAVE_GLPK)
[473]49    GET_TARGET_PROPERTY(TARGET_LOC lp_test LOCATION)
50    GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH)
51    ADD_CUSTOM_COMMAND(TARGET lp_test POST_BUILD
52      COMMAND cmake -E copy ${GLPK_BIN_DIR}/glpk.dll ${TARGET_PATH}
53      COMMAND cmake -E copy ${GLPK_BIN_DIR}/libltdl3.dll ${TARGET_PATH}
54      COMMAND cmake -E copy ${GLPK_BIN_DIR}/zlib1.dll ${TARGET_PATH}
55    )
[474]56  ENDIF(WIN32 AND HAVE_GLPK)
[473]57ENDIF(HAVE_LP)
58
59IF(HAVE_MIP)
60  ADD_EXECUTABLE(mip_test mip_test.cc)
[474]61  IF(HAVE_GLPK)
62    TARGET_LINK_LIBRARIES(mip_test lemon ${GLPK_LIBRARIES})
63  ENDIF(HAVE_GLPK)
[473]64  ADD_TEST(mip_test mip_test)
65
[474]66  IF(WIN32 AND HAVE_GLPK)
[473]67    GET_TARGET_PROPERTY(TARGET_LOC mip_test LOCATION)
68    GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH)
69    ADD_CUSTOM_COMMAND(TARGET mip_test POST_BUILD
70      COMMAND cmake -E copy ${GLPK_BIN_DIR}/glpk.dll ${TARGET_PATH}
71      COMMAND cmake -E copy ${GLPK_BIN_DIR}/libltdl3.dll ${TARGET_PATH}
72      COMMAND cmake -E copy ${GLPK_BIN_DIR}/zlib1.dll ${TARGET_PATH}
73    )
[474]74  ENDIF(WIN32 AND HAVE_GLPK)
[473]75ENDIF(HAVE_MIP)
76
[225]77FOREACH(TEST_NAME ${TESTS})
78  ADD_EXECUTABLE(${TEST_NAME} ${TEST_NAME}.cc)
79  TARGET_LINK_LIBRARIES(${TEST_NAME} lemon)
80  ADD_TEST(${TEST_NAME} ${TEST_NAME})
81ENDFOREACH(TEST_NAME)
Note: See TracBrowser for help on using the repository browser.