COIN-OR::LEMON - Graph Library

source: lemon/test/CMakeLists.txt @ 666:ec817dfc2cb7

Last change on this file since 666:ec817dfc2cb7 was 666:ec817dfc2cb7, checked in by Akos Ladanyi <ladanyi@…>, 10 years ago

FindGLPK improvements (#256)

File size: 2.0 KB
Line 
1INCLUDE_DIRECTORIES(
2  ${PROJECT_SOURCE_DIR}
3  ${PROJECT_BINARY_DIR}
4)
5
6LINK_DIRECTORIES(${PROJECT_BINARY_DIR}/lemon)
7
8SET(TESTS
9  adaptors_test
10  bfs_test
11  circulation_test
12  counter_test
13  dfs_test
14  digraph_test
15  dijkstra_test
16  dim_test
17  edge_set_test
18  error_test
19  euler_test
20  gomory_hu_test
21  graph_copy_test
22  graph_test
23  graph_utils_test
24  hao_orlin_test
25  heap_test
26  kruskal_test
27  maps_test
28  matching_test
29  min_cost_arborescence_test
30  min_cost_flow_test
31  path_test
32  preflow_test
33  radix_sort_test
34  random_test
35  suurballe_test
36  time_measure_test
37  unionfind_test)
38
39IF(HAVE_LP)
40  ADD_EXECUTABLE(lp_test lp_test.cc)
41  IF(HAVE_GLPK)
42    TARGET_LINK_LIBRARIES(lp_test lemon ${GLPK_LIBRARIES})
43  ENDIF(HAVE_GLPK)
44  ADD_TEST(lp_test lp_test)
45
46  IF(WIN32 AND HAVE_GLPK)
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    )
54  ENDIF(WIN32 AND HAVE_GLPK)
55ENDIF(HAVE_LP)
56
57IF(HAVE_MIP)
58  ADD_EXECUTABLE(mip_test mip_test.cc)
59  IF(HAVE_GLPK)
60    TARGET_LINK_LIBRARIES(mip_test lemon ${GLPK_LIBRARIES})
61  ENDIF(HAVE_GLPK)
62  ADD_TEST(mip_test mip_test)
63
64  IF(WIN32 AND HAVE_GLPK)
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    )
72  ENDIF(WIN32 AND HAVE_GLPK)
73ENDIF(HAVE_MIP)
74
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.