test/CMakeLists.txt
author Peter Kovacs <kpeter@inf.elte.hu>
Tue, 24 Mar 2009 00:18:25 +0100
changeset 651 8c3112a66878
parent 575 88bd39ef7d98
child 658 85cb3aa71cce
permissions -rw-r--r--
Use XTI implementation instead of ATI in NetworkSimplex (#234)

XTI (eXtended Threaded Index) is an imporved version of the widely
known ATI (Augmented Threaded Index) method for storing and updating
the spanning tree structure in Network Simplex algorithms.

In the ATI data structure three indices are stored for each node:
predecessor, thread and depth. In the XTI data structure depth is
replaced by the number of successors and the last successor
(according to the thread index).
ladanyi@496
     1
INCLUDE_DIRECTORIES(
ladanyi@496
     2
  ${CMAKE_SOURCE_DIR}
ladanyi@496
     3
  ${CMAKE_BINARY_DIR}
ladanyi@496
     4
)
deba@426
     5
ladanyi@498
     6
IF(HAVE_GLPK)
ladanyi@498
     7
  INCLUDE_DIRECTORIES(${GLPK_INCLUDE_DIR})
ladanyi@498
     8
ENDIF(HAVE_GLPK)
ladanyi@141
     9
alpar@225
    10
LINK_DIRECTORIES(${CMAKE_BINARY_DIR}/lemon)
ladanyi@141
    11
alpar@225
    12
SET(TESTS
deba@559
    13
  adaptors_test
ladanyi@141
    14
  bfs_test
alpar@443
    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@559
    21
  edge_set_test
ladanyi@141
    22
  error_test
ladanyi@569
    23
  euler_test
deba@200
    24
  graph_copy_test
ladanyi@141
    25
  graph_test
kpeter@171
    26
  graph_utils_test
deba@426
    27
  hao_orlin_test
deba@203
    28
  heap_test
ladanyi@141
    29
  kruskal_test
ladanyi@141
    30
  maps_test
deba@338
    31
  max_matching_test
deba@522
    32
  min_cost_arborescence_test
kpeter@648
    33
  min_cost_flow_test
alpar@443
    34
  path_test
alpar@443
    35
  preflow_test
ladanyi@496
    36
  radix_sort_test
alpar@225
    37
  random_test
alpar@443
    38
  suurballe_test
ladanyi@141
    39
  time_measure_test
ladanyi@141
    40
  unionfind_test)
ladanyi@141
    41
ladanyi@496
    42
IF(HAVE_LP)
ladanyi@496
    43
  ADD_EXECUTABLE(lp_test lp_test.cc)
ladanyi@498
    44
  IF(HAVE_GLPK)
ladanyi@498
    45
    TARGET_LINK_LIBRARIES(lp_test lemon ${GLPK_LIBRARIES})
ladanyi@498
    46
  ENDIF(HAVE_GLPK)
ladanyi@496
    47
  ADD_TEST(lp_test lp_test)
ladanyi@496
    48
ladanyi@498
    49
  IF(WIN32 AND HAVE_GLPK)
ladanyi@496
    50
    GET_TARGET_PROPERTY(TARGET_LOC lp_test LOCATION)
ladanyi@496
    51
    GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH)
ladanyi@496
    52
    ADD_CUSTOM_COMMAND(TARGET lp_test POST_BUILD
ladanyi@496
    53
      COMMAND cmake -E copy ${GLPK_BIN_DIR}/glpk.dll ${TARGET_PATH}
ladanyi@496
    54
      COMMAND cmake -E copy ${GLPK_BIN_DIR}/libltdl3.dll ${TARGET_PATH}
ladanyi@496
    55
      COMMAND cmake -E copy ${GLPK_BIN_DIR}/zlib1.dll ${TARGET_PATH}
ladanyi@496
    56
    )
ladanyi@498
    57
  ENDIF(WIN32 AND HAVE_GLPK)
ladanyi@496
    58
ENDIF(HAVE_LP)
ladanyi@496
    59
ladanyi@496
    60
IF(HAVE_MIP)
ladanyi@496
    61
  ADD_EXECUTABLE(mip_test mip_test.cc)
ladanyi@498
    62
  IF(HAVE_GLPK)
ladanyi@498
    63
    TARGET_LINK_LIBRARIES(mip_test lemon ${GLPK_LIBRARIES})
ladanyi@498
    64
  ENDIF(HAVE_GLPK)
ladanyi@496
    65
  ADD_TEST(mip_test mip_test)
ladanyi@496
    66
ladanyi@498
    67
  IF(WIN32 AND HAVE_GLPK)
ladanyi@496
    68
    GET_TARGET_PROPERTY(TARGET_LOC mip_test LOCATION)
ladanyi@496
    69
    GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH)
ladanyi@496
    70
    ADD_CUSTOM_COMMAND(TARGET mip_test POST_BUILD
ladanyi@496
    71
      COMMAND cmake -E copy ${GLPK_BIN_DIR}/glpk.dll ${TARGET_PATH}
ladanyi@496
    72
      COMMAND cmake -E copy ${GLPK_BIN_DIR}/libltdl3.dll ${TARGET_PATH}
ladanyi@496
    73
      COMMAND cmake -E copy ${GLPK_BIN_DIR}/zlib1.dll ${TARGET_PATH}
ladanyi@496
    74
    )
ladanyi@498
    75
  ENDIF(WIN32 AND HAVE_GLPK)
ladanyi@496
    76
ENDIF(HAVE_MIP)
ladanyi@496
    77
alpar@225
    78
FOREACH(TEST_NAME ${TESTS})
alpar@225
    79
  ADD_EXECUTABLE(${TEST_NAME} ${TEST_NAME}.cc)
alpar@225
    80
  TARGET_LINK_LIBRARIES(${TEST_NAME} lemon)
alpar@225
    81
  ADD_TEST(${TEST_NAME} ${TEST_NAME})
alpar@225
    82
ENDFOREACH(TEST_NAME)