COIN-OR::LEMON - Graph Library

source: lemon/test/CMakeLists.txt @ 658:85cb3aa71cce

Last change on this file since 658:85cb3aa71cce was 658:85cb3aa71cce, checked in by Alpar Juttner <alpar@…>, 14 years ago

Merge and fix

File size: 2.0 KB
RevLine 
[496]1INCLUDE_DIRECTORIES(
[596]2  ${PROJECT_SOURCE_DIR}
3  ${PROJECT_BINARY_DIR}
[496]4)
[426]5
[498]6IF(HAVE_GLPK)
7  INCLUDE_DIRECTORIES(${GLPK_INCLUDE_DIR})
8ENDIF(HAVE_GLPK)
[141]9
[596]10LINK_DIRECTORIES(${PROJECT_BINARY_DIR}/lemon)
[141]11
[225]12SET(TESTS
[559]13  adaptors_test
[141]14  bfs_test
[443]15  circulation_test
[141]16  counter_test
17  dfs_test
18  digraph_test
[170]19  dijkstra_test
[141]20  dim_test
[559]21  edge_set_test
[141]22  error_test
[569]23  euler_test
[590]24  gomory_hu_test
[200]25  graph_copy_test
[141]26  graph_test
[171]27  graph_utils_test
[426]28  hao_orlin_test
[203]29  heap_test
[141]30  kruskal_test
31  maps_test
[641]32  matching_test
[522]33  min_cost_arborescence_test
[648]34  min_cost_flow_test
[443]35  path_test
36  preflow_test
[496]37  radix_sort_test
[225]38  random_test
[443]39  suurballe_test
[141]40  time_measure_test
41  unionfind_test)
42
[496]43IF(HAVE_LP)
44  ADD_EXECUTABLE(lp_test lp_test.cc)
[498]45  IF(HAVE_GLPK)
46    TARGET_LINK_LIBRARIES(lp_test lemon ${GLPK_LIBRARIES})
47  ENDIF(HAVE_GLPK)
[496]48  ADD_TEST(lp_test lp_test)
49
[498]50  IF(WIN32 AND HAVE_GLPK)
[496]51    GET_TARGET_PROPERTY(TARGET_LOC lp_test LOCATION)
52    GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH)
53    ADD_CUSTOM_COMMAND(TARGET lp_test POST_BUILD
54      COMMAND cmake -E copy ${GLPK_BIN_DIR}/glpk.dll ${TARGET_PATH}
55      COMMAND cmake -E copy ${GLPK_BIN_DIR}/libltdl3.dll ${TARGET_PATH}
56      COMMAND cmake -E copy ${GLPK_BIN_DIR}/zlib1.dll ${TARGET_PATH}
57    )
[498]58  ENDIF(WIN32 AND HAVE_GLPK)
[496]59ENDIF(HAVE_LP)
60
61IF(HAVE_MIP)
62  ADD_EXECUTABLE(mip_test mip_test.cc)
[498]63  IF(HAVE_GLPK)
64    TARGET_LINK_LIBRARIES(mip_test lemon ${GLPK_LIBRARIES})
65  ENDIF(HAVE_GLPK)
[496]66  ADD_TEST(mip_test mip_test)
67
[498]68  IF(WIN32 AND HAVE_GLPK)
[496]69    GET_TARGET_PROPERTY(TARGET_LOC mip_test LOCATION)
70    GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH)
71    ADD_CUSTOM_COMMAND(TARGET mip_test POST_BUILD
72      COMMAND cmake -E copy ${GLPK_BIN_DIR}/glpk.dll ${TARGET_PATH}
73      COMMAND cmake -E copy ${GLPK_BIN_DIR}/libltdl3.dll ${TARGET_PATH}
74      COMMAND cmake -E copy ${GLPK_BIN_DIR}/zlib1.dll ${TARGET_PATH}
75    )
[498]76  ENDIF(WIN32 AND HAVE_GLPK)
[496]77ENDIF(HAVE_MIP)
78
[225]79FOREACH(TEST_NAME ${TESTS})
80  ADD_EXECUTABLE(${TEST_NAME} ${TEST_NAME}.cc)
81  TARGET_LINK_LIBRARIES(${TEST_NAME} lemon)
82  ADD_TEST(${TEST_NAME} ${TEST_NAME})
83ENDFOREACH(TEST_NAME)
Note: See TracBrowser for help on using the repository browser.