test/CMakeLists.txt
author Peter Kovacs <kpeter@inf.elte.hu>
Sat, 25 Apr 2009 18:25:59 +0200
changeset 614 28f58740b6f8
parent 586 d657c71db7db
parent 593 e8349c6f12ca
child 611 ec817dfc2cb7
permissions -rw-r--r--
Support infinite bounds in Circulation + fixes (#270, #266)

- Support infinite capacities.
- Bug fix in upperMap().
- Fixes and improvements in the documentation.
     1 INCLUDE_DIRECTORIES(
     2   ${PROJECT_SOURCE_DIR}
     3   ${PROJECT_BINARY_DIR}
     4 )
     5 
     6 IF(HAVE_GLPK)
     7   INCLUDE_DIRECTORIES(${GLPK_INCLUDE_DIR})
     8 ENDIF(HAVE_GLPK)
     9 
    10 LINK_DIRECTORIES(${PROJECT_BINARY_DIR}/lemon)
    11 
    12 SET(TESTS
    13   adaptors_test
    14   bfs_test
    15   circulation_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   gomory_hu_test
    25   graph_copy_test
    26   graph_test
    27   graph_utils_test
    28   hao_orlin_test
    29   heap_test
    30   kruskal_test
    31   maps_test
    32   matching_test
    33   min_cost_arborescence_test
    34   min_cost_flow_test
    35   path_test
    36   preflow_test
    37   radix_sort_test
    38   random_test
    39   suurballe_test
    40   time_measure_test
    41   unionfind_test)
    42 
    43 IF(HAVE_LP)
    44   ADD_EXECUTABLE(lp_test lp_test.cc)
    45   IF(HAVE_GLPK)
    46     TARGET_LINK_LIBRARIES(lp_test lemon ${GLPK_LIBRARIES})
    47   ENDIF(HAVE_GLPK)
    48   ADD_TEST(lp_test lp_test)
    49 
    50   IF(WIN32 AND HAVE_GLPK)
    51     GET_TARGET_PROPERTY(TARGET_LOC lp_test LOCATION)
    52     GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH)
    53     ADD_CUSTOM_COMMAND(TARGET lp_test POST_BUILD
    54       COMMAND cmake -E copy ${GLPK_BIN_DIR}/glpk.dll ${TARGET_PATH}
    55       COMMAND cmake -E copy ${GLPK_BIN_DIR}/libltdl3.dll ${TARGET_PATH}
    56       COMMAND cmake -E copy ${GLPK_BIN_DIR}/zlib1.dll ${TARGET_PATH}
    57     )
    58   ENDIF(WIN32 AND HAVE_GLPK)
    59 ENDIF(HAVE_LP)
    60 
    61 IF(HAVE_MIP)
    62   ADD_EXECUTABLE(mip_test mip_test.cc)
    63   IF(HAVE_GLPK)
    64     TARGET_LINK_LIBRARIES(mip_test lemon ${GLPK_LIBRARIES})
    65   ENDIF(HAVE_GLPK)
    66   ADD_TEST(mip_test mip_test)
    67 
    68   IF(WIN32 AND HAVE_GLPK)
    69     GET_TARGET_PROPERTY(TARGET_LOC mip_test LOCATION)
    70     GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH)
    71     ADD_CUSTOM_COMMAND(TARGET mip_test POST_BUILD
    72       COMMAND cmake -E copy ${GLPK_BIN_DIR}/glpk.dll ${TARGET_PATH}
    73       COMMAND cmake -E copy ${GLPK_BIN_DIR}/libltdl3.dll ${TARGET_PATH}
    74       COMMAND cmake -E copy ${GLPK_BIN_DIR}/zlib1.dll ${TARGET_PATH}
    75     )
    76   ENDIF(WIN32 AND HAVE_GLPK)
    77 ENDIF(HAVE_MIP)
    78 
    79 FOREACH(TEST_NAME ${TESTS})
    80   ADD_EXECUTABLE(${TEST_NAME} ${TEST_NAME}.cc)
    81   TARGET_LINK_LIBRARIES(${TEST_NAME} lemon)
    82   ADD_TEST(${TEST_NAME} ${TEST_NAME})
    83 ENDFOREACH(TEST_NAME)