COIN-OR::LEMON - Graph Library

source: lemon/test/CMakeLists.txt @ 1017:5087694945e4

Last change on this file since 1017:5087694945e4 was 1017:5087694945e4, checked in by Balazs Dezso <deba@…>, 9 years ago

New implementation for Nagamochi-Ibaraki algorithm

File size: 3.4 KB
Line 
1INCLUDE_DIRECTORIES(
2  ${PROJECT_SOURCE_DIR}
3  ${PROJECT_BINARY_DIR}
4)
5
6LINK_DIRECTORIES(
7  ${PROJECT_BINARY_DIR}/lemon
8)
9
10SET(TESTS
11  adaptors_test
12  bellman_ford_test
13  bfs_test
14  circulation_test
15  connectivity_test
16  counter_test
17  dfs_test
18  digraph_test
19  dijkstra_test
20  dim_test
21  edge_set_test
22  error_test
23  euler_test
24  fractional_matching_test
25  gomory_hu_test
26  graph_copy_test
27  graph_test
28  graph_utils_test
29  hao_orlin_test
30  heap_test
31  kruskal_test
32  maps_test
33  matching_test
34  max_clique_test
35  min_cost_arborescence_test
36  min_cost_flow_test
37  min_mean_cycle_test
38  nagamochi_ibaraki_test
39  path_test
40  planarity_test
41  preflow_test
42  radix_sort_test
43  random_test
44  suurballe_test
45  time_measure_test
46  unionfind_test
47)
48
49IF(LEMON_HAVE_LP)
50  ADD_EXECUTABLE(lp_test lp_test.cc)
51  SET(LP_TEST_LIBS lemon)
52
53  IF(LEMON_HAVE_GLPK)
54    SET(LP_TEST_LIBS ${LP_TEST_LIBS} ${GLPK_LIBRARIES})
55  ENDIF()
56  IF(LEMON_HAVE_CPLEX)
57    SET(LP_TEST_LIBS ${LP_TEST_LIBS} ${CPLEX_LIBRARIES})
58  ENDIF()
59  IF(LEMON_HAVE_CLP)
60    SET(LP_TEST_LIBS ${LP_TEST_LIBS} ${COIN_CLP_LIBRARIES})
61  ENDIF()
62
63  TARGET_LINK_LIBRARIES(lp_test ${LP_TEST_LIBS})
64  ADD_TEST(lp_test lp_test)
65
66  IF(WIN32 AND LEMON_HAVE_GLPK)
67    GET_TARGET_PROPERTY(TARGET_LOC lp_test LOCATION)
68    GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH)
69    ADD_CUSTOM_COMMAND(TARGET lp_test POST_BUILD
70      COMMAND ${CMAKE_COMMAND} -E copy ${GLPK_BIN_DIR}/glpk.dll ${TARGET_PATH}
71      COMMAND ${CMAKE_COMMAND} -E copy ${GLPK_BIN_DIR}/libltdl3.dll ${TARGET_PATH}
72      COMMAND ${CMAKE_COMMAND} -E copy ${GLPK_BIN_DIR}/zlib1.dll ${TARGET_PATH}
73    )
74  ENDIF()
75
76  IF(WIN32 AND LEMON_HAVE_CPLEX)
77    GET_TARGET_PROPERTY(TARGET_LOC lp_test LOCATION)
78    GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH)
79    ADD_CUSTOM_COMMAND(TARGET lp_test POST_BUILD
80      COMMAND ${CMAKE_COMMAND} -E copy ${CPLEX_BIN_DIR}/cplex91.dll ${TARGET_PATH}
81    )
82  ENDIF()
83ENDIF()
84
85IF(LEMON_HAVE_MIP)
86  ADD_EXECUTABLE(mip_test mip_test.cc)
87  SET(MIP_TEST_LIBS lemon)
88
89  IF(LEMON_HAVE_GLPK)
90    SET(MIP_TEST_LIBS ${MIP_TEST_LIBS} ${GLPK_LIBRARIES})
91  ENDIF()
92  IF(LEMON_HAVE_CPLEX)
93    SET(MIP_TEST_LIBS ${MIP_TEST_LIBS} ${CPLEX_LIBRARIES})
94  ENDIF()
95  IF(LEMON_HAVE_CBC)
96    SET(MIP_TEST_LIBS ${MIP_TEST_LIBS} ${COIN_CBC_LIBRARIES})
97  ENDIF()
98
99  TARGET_LINK_LIBRARIES(mip_test ${MIP_TEST_LIBS})
100  ADD_TEST(mip_test mip_test)
101
102  IF(WIN32 AND LEMON_HAVE_GLPK)
103    GET_TARGET_PROPERTY(TARGET_LOC mip_test LOCATION)
104    GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH)
105    ADD_CUSTOM_COMMAND(TARGET mip_test POST_BUILD
106      COMMAND ${CMAKE_COMMAND} -E copy ${GLPK_BIN_DIR}/glpk.dll ${TARGET_PATH}
107      COMMAND ${CMAKE_COMMAND} -E copy ${GLPK_BIN_DIR}/libltdl3.dll ${TARGET_PATH}
108      COMMAND ${CMAKE_COMMAND} -E copy ${GLPK_BIN_DIR}/zlib1.dll ${TARGET_PATH}
109    )
110  ENDIF()
111
112  IF(WIN32 AND LEMON_HAVE_CPLEX)
113    GET_TARGET_PROPERTY(TARGET_LOC mip_test LOCATION)
114    GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH)
115    ADD_CUSTOM_COMMAND(TARGET mip_test POST_BUILD
116      COMMAND ${CMAKE_COMMAND} -E copy ${CPLEX_BIN_DIR}/cplex91.dll ${TARGET_PATH}
117    )
118  ENDIF()
119ENDIF()
120
121FOREACH(TEST_NAME ${TESTS})
122  IF(${CMAKE_BUILD_TYPE} STREQUAL "Maintainer")
123    ADD_EXECUTABLE(${TEST_NAME} ${TEST_NAME}.cc)
124  ELSE()
125    ADD_EXECUTABLE(${TEST_NAME} EXCLUDE_FROM_ALL ${TEST_NAME}.cc)
126  ENDIF()
127  TARGET_LINK_LIBRARIES(${TEST_NAME} lemon)
128  ADD_TEST(${TEST_NAME} ${TEST_NAME})
129  ADD_DEPENDENCIES(check ${TEST_NAME})
130ENDFOREACH()
Note: See TracBrowser for help on using the repository browser.