COIN-OR::LEMON - Graph Library

source: lemon/test/CMakeLists.txt @ 1350:a037254714b3

Last change on this file since 1350:a037254714b3 was 1350:a037254714b3, checked in by Peter Madarasi <madarasip@…>, 10 years ago

VF2 algorithm added (#597)

The implementation of this feature was sponsored by QuantumBio? Inc.

File size: 4.2 KB
RevLine 
[539]1INCLUDE_DIRECTORIES(
[596]2  ${PROJECT_SOURCE_DIR}
[539]3  ${PROJECT_BINARY_DIR}
4)
[141]5
[726]6LINK_DIRECTORIES(
7  ${PROJECT_BINARY_DIR}/lemon
8)
[539]9
[1044]10SET(TEST_WITH_VALGRIND "NO" CACHE STRING
11  "Run the test with valgrind (YES/NO).")
12SET(VALGRIND_FLAGS "" CACHE STRING "Valgrind flags used by the tests.")
[141]13
[225]14SET(TESTS
[559]15  adaptors_test
[1149]16  arc_look_up_test
[745]17  bellman_ford_test
[141]18  bfs_test
[1186]19  bpgraph_test
[443]20  circulation_test
[696]21  connectivity_test
[141]22  counter_test
23  dfs_test
24  digraph_test
[170]25  dijkstra_test
[141]26  dim_test
[559]27  edge_set_test
[141]28  error_test
[569]29  euler_test
[948]30  fractional_matching_test
[590]31  gomory_hu_test
[200]32  graph_copy_test
[141]33  graph_test
[171]34  graph_utils_test
[426]35  hao_orlin_test
[203]36  heap_test
[141]37  kruskal_test
[1198]38  lgf_reader_writer_test
[1067]39  lgf_test
[141]40  maps_test
[641]41  matching_test
[1020]42  max_cardinality_search_test
[999]43  max_clique_test
[1228]44  max_flow_test
[522]45  min_cost_arborescence_test
[648]46  min_cost_flow_test
[810]47  min_mean_cycle_test
[1017]48  nagamochi_ibaraki_test
[443]49  path_test
[861]50  planarity_test
[496]51  radix_sort_test
[225]52  random_test
[443]53  suurballe_test
[141]54  time_measure_test
[1203]55  tsp_test
[726]56  unionfind_test
[1350]57  vf2_test
[726]58)
[539]59
[674]60IF(LEMON_HAVE_LP)
[1033]61  IF(${CMAKE_BUILD_TYPE} STREQUAL "Maintainer")
62    ADD_EXECUTABLE(lp_test lp_test.cc)
63  ELSE()
64    ADD_EXECUTABLE(lp_test EXCLUDE_FROM_ALL lp_test.cc)
65  ENDIF()
66
[667]67  SET(LP_TEST_LIBS lemon)
[726]68
[674]69  IF(LEMON_HAVE_GLPK)
[667]70    SET(LP_TEST_LIBS ${LP_TEST_LIBS} ${GLPK_LIBRARIES})
[726]71  ENDIF()
[674]72  IF(LEMON_HAVE_CPLEX)
[1230]73    SET(LP_TEST_LIBS ${LP_TEST_LIBS} ${ILOG_LIBRARIES})
[726]74  ENDIF()
[674]75  IF(LEMON_HAVE_CLP)
[668]76    SET(LP_TEST_LIBS ${LP_TEST_LIBS} ${COIN_CLP_LIBRARIES})
[726]77  ENDIF()
[1264]78  IF(LEMON_HAVE_SOPLEX)
79    SET(LP_TEST_LIBS ${LP_TEST_LIBS} ${SOPLEX_LIBRARIES})
80  ENDIF()
[726]81
[667]82  TARGET_LINK_LIBRARIES(lp_test ${LP_TEST_LIBS})
[496]83  ADD_TEST(lp_test lp_test)
[1061]84  ADD_DEPENDENCIES(check lp_test)
[496]85
[674]86  IF(WIN32 AND LEMON_HAVE_GLPK)
[496]87    GET_TARGET_PROPERTY(TARGET_LOC lp_test LOCATION)
88    GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH)
89    ADD_CUSTOM_COMMAND(TARGET lp_test POST_BUILD
[726]90      COMMAND ${CMAKE_COMMAND} -E copy ${GLPK_BIN_DIR}/glpk.dll ${TARGET_PATH}
91      COMMAND ${CMAKE_COMMAND} -E copy ${GLPK_BIN_DIR}/libltdl3.dll ${TARGET_PATH}
92      COMMAND ${CMAKE_COMMAND} -E copy ${GLPK_BIN_DIR}/zlib1.dll ${TARGET_PATH}
[496]93    )
[726]94  ENDIF()
95
[674]96  IF(WIN32 AND LEMON_HAVE_CPLEX)
[667]97    GET_TARGET_PROPERTY(TARGET_LOC lp_test LOCATION)
98    GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH)
99    ADD_CUSTOM_COMMAND(TARGET lp_test POST_BUILD
[1230]100      COMMAND ${CMAKE_COMMAND} -E copy ${ILOG_CPLEX_DLL} ${TARGET_PATH}
[667]101    )
[726]102  ENDIF()
103ENDIF()
[496]104
[674]105IF(LEMON_HAVE_MIP)
[1033]106  IF(${CMAKE_BUILD_TYPE} STREQUAL "Maintainer")
107    ADD_EXECUTABLE(mip_test mip_test.cc)
108  ELSE()
109    ADD_EXECUTABLE(mip_test EXCLUDE_FROM_ALL mip_test.cc)
110  ENDIF()
111
[667]112  SET(MIP_TEST_LIBS lemon)
[726]113
[674]114  IF(LEMON_HAVE_GLPK)
[667]115    SET(MIP_TEST_LIBS ${MIP_TEST_LIBS} ${GLPK_LIBRARIES})
[726]116  ENDIF()
[674]117  IF(LEMON_HAVE_CPLEX)
[1230]118    SET(MIP_TEST_LIBS ${MIP_TEST_LIBS} ${ILOG_LIBRARIES})
[726]119  ENDIF()
[674]120  IF(LEMON_HAVE_CBC)
[668]121    SET(MIP_TEST_LIBS ${MIP_TEST_LIBS} ${COIN_CBC_LIBRARIES})
[726]122  ENDIF()
123
[667]124  TARGET_LINK_LIBRARIES(mip_test ${MIP_TEST_LIBS})
[496]125  ADD_TEST(mip_test mip_test)
[1061]126  ADD_DEPENDENCIES(check mip_test)
[496]127
[674]128  IF(WIN32 AND LEMON_HAVE_GLPK)
[496]129    GET_TARGET_PROPERTY(TARGET_LOC mip_test LOCATION)
130    GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH)
131    ADD_CUSTOM_COMMAND(TARGET mip_test POST_BUILD
[726]132      COMMAND ${CMAKE_COMMAND} -E copy ${GLPK_BIN_DIR}/glpk.dll ${TARGET_PATH}
133      COMMAND ${CMAKE_COMMAND} -E copy ${GLPK_BIN_DIR}/libltdl3.dll ${TARGET_PATH}
134      COMMAND ${CMAKE_COMMAND} -E copy ${GLPK_BIN_DIR}/zlib1.dll ${TARGET_PATH}
[496]135    )
[726]136  ENDIF()
137
[674]138  IF(WIN32 AND LEMON_HAVE_CPLEX)
[667]139    GET_TARGET_PROPERTY(TARGET_LOC mip_test LOCATION)
140    GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH)
141    ADD_CUSTOM_COMMAND(TARGET mip_test POST_BUILD
[1230]142      COMMAND ${CMAKE_COMMAND} -E copy ${ILOG_CPLEX_DLL} ${TARGET_PATH}
[667]143    )
[726]144  ENDIF()
145ENDIF()
[141]146
[225]147FOREACH(TEST_NAME ${TESTS})
[1033]148  IF(${CMAKE_BUILD_TYPE} STREQUAL "Maintainer")
149    ADD_EXECUTABLE(${TEST_NAME} ${TEST_NAME}.cc)
150  ELSE()
151    ADD_EXECUTABLE(${TEST_NAME} EXCLUDE_FROM_ALL ${TEST_NAME}.cc)
152  ENDIF()
[225]153  TARGET_LINK_LIBRARIES(${TEST_NAME} lemon)
[1044]154    IF(TEST_WITH_VALGRIND)
155      ADD_TEST(${TEST_NAME}
156        valgrind --error-exitcode=1 ${VALGRIND_FLAGS}
157        ${CMAKE_CURRENT_BINARY_DIR}/${TEST_NAME} )
158    ELSE()
159      ADD_TEST(${TEST_NAME} ${TEST_NAME})
160    ENDIF()
[1033]161  ADD_DEPENDENCIES(check ${TEST_NAME})
[726]162ENDFOREACH()
Note: See TracBrowser for help on using the repository browser.