COIN-OR::LEMON - Graph Library

source: lemon-main/test/CMakeLists.txt @ 519:c786cd201266

Last change on this file since 519:c786cd201266 was 488:9b9ffe7d9b75, checked in by Balazs Dezso <deba@…>, 16 years ago

Fixes for MSVC 2008 in grap_adaptors.h and edge_set.h (#194)

Several renamings and changes in adaptors and edge sets

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