[473] | 1 | INCLUDE_DIRECTORIES( |
---|
| 2 | ${CMAKE_SOURCE_DIR} |
---|
| 3 | ${CMAKE_BINARY_DIR} |
---|
| 4 | ) |
---|
[141] | 5 | |
---|
[474] | 6 | IF(HAVE_GLPK) |
---|
| 7 | INCLUDE_DIRECTORIES(${GLPK_INCLUDE_DIR}) |
---|
| 8 | ENDIF(HAVE_GLPK) |
---|
| 9 | |
---|
[225] | 10 | LINK_DIRECTORIES(${CMAKE_BINARY_DIR}/lemon) |
---|
[141] | 11 | |
---|
[225] | 12 | SET(TESTS |
---|
[488] | 13 | adaptors_test |
---|
[141] | 14 | bfs_test |
---|
[424] | 15 | circulation_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 |
---|
[200] | 24 | graph_copy_test |
---|
[141] | 25 | graph_test |
---|
[171] | 26 | graph_utils_test |
---|
[410] | 27 | hao_orlin_test |
---|
[203] | 28 | heap_test |
---|
[141] | 29 | kruskal_test |
---|
| 30 | maps_test |
---|
[326] | 31 | max_matching_test |
---|
[424] | 32 | path_test |
---|
| 33 | preflow_test |
---|
[473] | 34 | radix_sort_test |
---|
[225] | 35 | random_test |
---|
[424] | 36 | suurballe_test |
---|
[141] | 37 | time_measure_test |
---|
| 38 | unionfind_test) |
---|
| 39 | |
---|
[473] | 40 | IF(HAVE_LP) |
---|
| 41 | ADD_EXECUTABLE(lp_test lp_test.cc) |
---|
[474] | 42 | IF(HAVE_GLPK) |
---|
| 43 | TARGET_LINK_LIBRARIES(lp_test lemon ${GLPK_LIBRARIES}) |
---|
| 44 | ENDIF(HAVE_GLPK) |
---|
[473] | 45 | ADD_TEST(lp_test lp_test) |
---|
| 46 | |
---|
[474] | 47 | IF(WIN32 AND HAVE_GLPK) |
---|
[473] | 48 | GET_TARGET_PROPERTY(TARGET_LOC lp_test LOCATION) |
---|
| 49 | GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH) |
---|
| 50 | ADD_CUSTOM_COMMAND(TARGET lp_test POST_BUILD |
---|
| 51 | COMMAND cmake -E copy ${GLPK_BIN_DIR}/glpk.dll ${TARGET_PATH} |
---|
| 52 | COMMAND cmake -E copy ${GLPK_BIN_DIR}/libltdl3.dll ${TARGET_PATH} |
---|
| 53 | COMMAND cmake -E copy ${GLPK_BIN_DIR}/zlib1.dll ${TARGET_PATH} |
---|
| 54 | ) |
---|
[474] | 55 | ENDIF(WIN32 AND HAVE_GLPK) |
---|
[473] | 56 | ENDIF(HAVE_LP) |
---|
| 57 | |
---|
| 58 | IF(HAVE_MIP) |
---|
| 59 | ADD_EXECUTABLE(mip_test mip_test.cc) |
---|
[474] | 60 | IF(HAVE_GLPK) |
---|
| 61 | TARGET_LINK_LIBRARIES(mip_test lemon ${GLPK_LIBRARIES}) |
---|
| 62 | ENDIF(HAVE_GLPK) |
---|
[473] | 63 | ADD_TEST(mip_test mip_test) |
---|
| 64 | |
---|
[474] | 65 | IF(WIN32 AND HAVE_GLPK) |
---|
[473] | 66 | GET_TARGET_PROPERTY(TARGET_LOC mip_test LOCATION) |
---|
| 67 | GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH) |
---|
| 68 | ADD_CUSTOM_COMMAND(TARGET mip_test POST_BUILD |
---|
| 69 | COMMAND cmake -E copy ${GLPK_BIN_DIR}/glpk.dll ${TARGET_PATH} |
---|
| 70 | COMMAND cmake -E copy ${GLPK_BIN_DIR}/libltdl3.dll ${TARGET_PATH} |
---|
| 71 | COMMAND cmake -E copy ${GLPK_BIN_DIR}/zlib1.dll ${TARGET_PATH} |
---|
| 72 | ) |
---|
[474] | 73 | ENDIF(WIN32 AND HAVE_GLPK) |
---|
[473] | 74 | ENDIF(HAVE_MIP) |
---|
| 75 | |
---|
[225] | 76 | FOREACH(TEST_NAME ${TESTS}) |
---|
| 77 | ADD_EXECUTABLE(${TEST_NAME} ${TEST_NAME}.cc) |
---|
| 78 | TARGET_LINK_LIBRARIES(${TEST_NAME} lemon) |
---|
| 79 | ADD_TEST(${TEST_NAME} ${TEST_NAME}) |
---|
| 80 | ENDFOREACH(TEST_NAME) |
---|