COIN-OR::LEMON - Graph Library

source: lemon-main/test/CMakeLists.txt @ 919:e0cef67fe565

Last change on this file since 919:e0cef67fe565 was 917:4980b05606bd, checked in by Alpar Juttner <alpar@…>, 14 years ago

Merge

File size: 3.7 KB
RevLine 
[510]1INCLUDE_DIRECTORIES(
[549]2  ${PROJECT_SOURCE_DIR}
[510]3  ${PROJECT_BINARY_DIR}
4)
[141]5
[679]6LINK_DIRECTORIES(
7  ${PROJECT_BINARY_DIR}/lemon
8)
[141]9
[225]10SET(TESTS
[488]11  adaptors_test
[698]12  bellman_ford_test
[141]13  bfs_test
[424]14  circulation_test
[649]15  connectivity_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
[522]23  euler_test
[869]24  fractional_matching_test
[543]25  gomory_hu_test
[200]26  graph_copy_test
[141]27  graph_test
[171]28  graph_utils_test
[410]29  hao_orlin_test
[203]30  heap_test
[141]31  kruskal_test
32  maps_test
[594]33  matching_test
[916]34  max_cardinality_search_test
[904]35  max_clique_test
[501]36  min_cost_arborescence_test
[601]37  min_cost_flow_test
[763]38  min_mean_cycle_test
[913]39  nagamochi_ibaraki_test
[424]40  path_test
[797]41  planarity_test
[424]42  preflow_test
[473]43  radix_sort_test
[225]44  random_test
[424]45  suurballe_test
[141]46  time_measure_test
[679]47  unionfind_test
48)
[141]49
[627]50IF(LEMON_HAVE_LP)
[909]51  IF(${CMAKE_BUILD_TYPE} STREQUAL "Maintainer")
52    ADD_EXECUTABLE(lp_test lp_test.cc)
53  ELSE()
54    ADD_EXECUTABLE(lp_test EXCLUDE_FROM_ALL lp_test.cc)
55  ENDIF()
56
[620]57  SET(LP_TEST_LIBS lemon)
[679]58
[627]59  IF(LEMON_HAVE_GLPK)
[620]60    SET(LP_TEST_LIBS ${LP_TEST_LIBS} ${GLPK_LIBRARIES})
[679]61  ENDIF()
[627]62  IF(LEMON_HAVE_CPLEX)
[620]63    SET(LP_TEST_LIBS ${LP_TEST_LIBS} ${CPLEX_LIBRARIES})
[679]64  ENDIF()
[627]65  IF(LEMON_HAVE_CLP)
[621]66    SET(LP_TEST_LIBS ${LP_TEST_LIBS} ${COIN_CLP_LIBRARIES})
[679]67  ENDIF()
68
[620]69  TARGET_LINK_LIBRARIES(lp_test ${LP_TEST_LIBS})
[473]70  ADD_TEST(lp_test lp_test)
71
[627]72  IF(WIN32 AND LEMON_HAVE_GLPK)
[473]73    GET_TARGET_PROPERTY(TARGET_LOC lp_test LOCATION)
74    GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH)
75    ADD_CUSTOM_COMMAND(TARGET lp_test POST_BUILD
[679]76      COMMAND ${CMAKE_COMMAND} -E copy ${GLPK_BIN_DIR}/glpk.dll ${TARGET_PATH}
77      COMMAND ${CMAKE_COMMAND} -E copy ${GLPK_BIN_DIR}/libltdl3.dll ${TARGET_PATH}
78      COMMAND ${CMAKE_COMMAND} -E copy ${GLPK_BIN_DIR}/zlib1.dll ${TARGET_PATH}
[473]79    )
[679]80  ENDIF()
81
[627]82  IF(WIN32 AND LEMON_HAVE_CPLEX)
[620]83    GET_TARGET_PROPERTY(TARGET_LOC lp_test LOCATION)
84    GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH)
85    ADD_CUSTOM_COMMAND(TARGET lp_test POST_BUILD
[679]86      COMMAND ${CMAKE_COMMAND} -E copy ${CPLEX_BIN_DIR}/cplex91.dll ${TARGET_PATH}
[620]87    )
[679]88  ENDIF()
89ENDIF()
[473]90
[627]91IF(LEMON_HAVE_MIP)
[909]92  IF(${CMAKE_BUILD_TYPE} STREQUAL "Maintainer")
93    ADD_EXECUTABLE(mip_test mip_test.cc)
94  ELSE()
95    ADD_EXECUTABLE(mip_test EXCLUDE_FROM_ALL mip_test.cc)
96  ENDIF()
97
[620]98  SET(MIP_TEST_LIBS lemon)
[679]99
[627]100  IF(LEMON_HAVE_GLPK)
[620]101    SET(MIP_TEST_LIBS ${MIP_TEST_LIBS} ${GLPK_LIBRARIES})
[679]102  ENDIF()
[627]103  IF(LEMON_HAVE_CPLEX)
[620]104    SET(MIP_TEST_LIBS ${MIP_TEST_LIBS} ${CPLEX_LIBRARIES})
[679]105  ENDIF()
[627]106  IF(LEMON_HAVE_CBC)
[621]107    SET(MIP_TEST_LIBS ${MIP_TEST_LIBS} ${COIN_CBC_LIBRARIES})
[679]108  ENDIF()
109
[620]110  TARGET_LINK_LIBRARIES(mip_test ${MIP_TEST_LIBS})
[473]111  ADD_TEST(mip_test mip_test)
112
[627]113  IF(WIN32 AND LEMON_HAVE_GLPK)
[473]114    GET_TARGET_PROPERTY(TARGET_LOC mip_test LOCATION)
115    GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH)
116    ADD_CUSTOM_COMMAND(TARGET mip_test POST_BUILD
[679]117      COMMAND ${CMAKE_COMMAND} -E copy ${GLPK_BIN_DIR}/glpk.dll ${TARGET_PATH}
118      COMMAND ${CMAKE_COMMAND} -E copy ${GLPK_BIN_DIR}/libltdl3.dll ${TARGET_PATH}
119      COMMAND ${CMAKE_COMMAND} -E copy ${GLPK_BIN_DIR}/zlib1.dll ${TARGET_PATH}
[473]120    )
[679]121  ENDIF()
122
[627]123  IF(WIN32 AND LEMON_HAVE_CPLEX)
[620]124    GET_TARGET_PROPERTY(TARGET_LOC mip_test LOCATION)
125    GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH)
126    ADD_CUSTOM_COMMAND(TARGET mip_test POST_BUILD
[679]127      COMMAND ${CMAKE_COMMAND} -E copy ${CPLEX_BIN_DIR}/cplex91.dll ${TARGET_PATH}
[620]128    )
[679]129  ENDIF()
130ENDIF()
[473]131
[225]132FOREACH(TEST_NAME ${TESTS})
[901]133  IF(${CMAKE_BUILD_TYPE} STREQUAL "Maintainer")
134    ADD_EXECUTABLE(${TEST_NAME} ${TEST_NAME}.cc)
135  ELSE()
136    ADD_EXECUTABLE(${TEST_NAME} EXCLUDE_FROM_ALL ${TEST_NAME}.cc)
137  ENDIF()
[225]138  TARGET_LINK_LIBRARIES(${TEST_NAME} lemon)
139  ADD_TEST(${TEST_NAME} ${TEST_NAME})
[897]140  ADD_DEPENDENCIES(check ${TEST_NAME})
[679]141ENDFOREACH()
Note: See TracBrowser for help on using the repository browser.