test/CMakeLists.txt
author Peter Kovacs <kpeter@inf.elte.hu>
Sat, 25 Apr 2009 02:12:41 +0200
changeset 623 7c1324b35d89
parent 594 d657c71db7db
parent 601 e8349c6f12ca
child 619 ec817dfc2cb7
permissions -rw-r--r--
Modify the interface of Suurballe (#266, #181)

- Move the parameters s and t from the constructor to the run()
function. It makes the interface capable for multiple run(s,t,k)
calls (possible improvement in the future) and it is more similar
to Dijkstra.
- Simliarly init() and findFlow(k) were replaced by init(s) and
findFlow(t,k). The separation of parameters s and t is for the
future plans of supporting multiple targets with one source node.
For more information see #181.
- LEMON_ASSERT for the Length type (check if it is integer).
- Doc improvements.
- Rearrange query functions.
- Extend test file.
ladanyi@473
     1
INCLUDE_DIRECTORIES(
ladanyi@549
     2
  ${PROJECT_SOURCE_DIR}
ladanyi@549
     3
  ${PROJECT_BINARY_DIR}
ladanyi@473
     4
)
deba@410
     5
ladanyi@474
     6
IF(HAVE_GLPK)
ladanyi@474
     7
  INCLUDE_DIRECTORIES(${GLPK_INCLUDE_DIR})
ladanyi@474
     8
ENDIF(HAVE_GLPK)
ladanyi@141
     9
ladanyi@549
    10
LINK_DIRECTORIES(${PROJECT_BINARY_DIR}/lemon)
ladanyi@141
    11
alpar@225
    12
SET(TESTS
deba@488
    13
  adaptors_test
ladanyi@141
    14
  bfs_test
alpar@424
    15
  circulation_test
ladanyi@141
    16
  counter_test
ladanyi@141
    17
  dfs_test
ladanyi@141
    18
  digraph_test
kpeter@170
    19
  dijkstra_test
ladanyi@141
    20
  dim_test
deba@488
    21
  edge_set_test
ladanyi@141
    22
  error_test
ladanyi@522
    23
  euler_test
tapolcai@543
    24
  gomory_hu_test
deba@200
    25
  graph_copy_test
ladanyi@141
    26
  graph_test
kpeter@171
    27
  graph_utils_test
deba@410
    28
  hao_orlin_test
deba@203
    29
  heap_test
ladanyi@141
    30
  kruskal_test
ladanyi@141
    31
  maps_test
kpeter@594
    32
  matching_test
deba@501
    33
  min_cost_arborescence_test
kpeter@601
    34
  min_cost_flow_test
alpar@424
    35
  path_test
alpar@424
    36
  preflow_test
ladanyi@473
    37
  radix_sort_test
alpar@225
    38
  random_test
alpar@424
    39
  suurballe_test
ladanyi@141
    40
  time_measure_test
ladanyi@141
    41
  unionfind_test)
ladanyi@141
    42
ladanyi@473
    43
IF(HAVE_LP)
ladanyi@473
    44
  ADD_EXECUTABLE(lp_test lp_test.cc)
ladanyi@474
    45
  IF(HAVE_GLPK)
ladanyi@474
    46
    TARGET_LINK_LIBRARIES(lp_test lemon ${GLPK_LIBRARIES})
ladanyi@474
    47
  ENDIF(HAVE_GLPK)
ladanyi@473
    48
  ADD_TEST(lp_test lp_test)
ladanyi@473
    49
ladanyi@474
    50
  IF(WIN32 AND HAVE_GLPK)
ladanyi@473
    51
    GET_TARGET_PROPERTY(TARGET_LOC lp_test LOCATION)
ladanyi@473
    52
    GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH)
ladanyi@473
    53
    ADD_CUSTOM_COMMAND(TARGET lp_test POST_BUILD
ladanyi@473
    54
      COMMAND cmake -E copy ${GLPK_BIN_DIR}/glpk.dll ${TARGET_PATH}
ladanyi@473
    55
      COMMAND cmake -E copy ${GLPK_BIN_DIR}/libltdl3.dll ${TARGET_PATH}
ladanyi@473
    56
      COMMAND cmake -E copy ${GLPK_BIN_DIR}/zlib1.dll ${TARGET_PATH}
ladanyi@473
    57
    )
ladanyi@474
    58
  ENDIF(WIN32 AND HAVE_GLPK)
ladanyi@473
    59
ENDIF(HAVE_LP)
ladanyi@473
    60
ladanyi@473
    61
IF(HAVE_MIP)
ladanyi@473
    62
  ADD_EXECUTABLE(mip_test mip_test.cc)
ladanyi@474
    63
  IF(HAVE_GLPK)
ladanyi@474
    64
    TARGET_LINK_LIBRARIES(mip_test lemon ${GLPK_LIBRARIES})
ladanyi@474
    65
  ENDIF(HAVE_GLPK)
ladanyi@473
    66
  ADD_TEST(mip_test mip_test)
ladanyi@473
    67
ladanyi@474
    68
  IF(WIN32 AND HAVE_GLPK)
ladanyi@473
    69
    GET_TARGET_PROPERTY(TARGET_LOC mip_test LOCATION)
ladanyi@473
    70
    GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH)
ladanyi@473
    71
    ADD_CUSTOM_COMMAND(TARGET mip_test POST_BUILD
ladanyi@473
    72
      COMMAND cmake -E copy ${GLPK_BIN_DIR}/glpk.dll ${TARGET_PATH}
ladanyi@473
    73
      COMMAND cmake -E copy ${GLPK_BIN_DIR}/libltdl3.dll ${TARGET_PATH}
ladanyi@473
    74
      COMMAND cmake -E copy ${GLPK_BIN_DIR}/zlib1.dll ${TARGET_PATH}
ladanyi@473
    75
    )
ladanyi@474
    76
  ENDIF(WIN32 AND HAVE_GLPK)
ladanyi@473
    77
ENDIF(HAVE_MIP)
ladanyi@473
    78
alpar@225
    79
FOREACH(TEST_NAME ${TESTS})
alpar@225
    80
  ADD_EXECUTABLE(${TEST_NAME} ${TEST_NAME}.cc)
alpar@225
    81
  TARGET_LINK_LIBRARIES(${TEST_NAME} lemon)
alpar@225
    82
  ADD_TEST(${TEST_NAME} ${TEST_NAME})
alpar@225
    83
ENDFOREACH(TEST_NAME)