test/CMakeLists.txt
author Peter Kovacs <kpeter@inf.elte.hu>
Tue, 12 May 2009 12:06:40 +0200
changeset 661 8b0df68370a4
parent 622 20dac2104519
child 681 9c7639f3a741
permissions -rw-r--r--
Fix the GEQ/LEQ handling in NetworkSimplex + improve doc (#291)

- Fix the optimality conditions for the GEQ/LEQ form.
- Fix the initialization of the algortihm. It ensures correct
solutions and it is much faster for the inequality forms.
- Fix the pivot rules to search all the arcs that have to be
allowed to get in the basis.
- Better block size for the Block Search pivot rule.
- Improve documentation of the problem and move it to a
separate page.
ladanyi@620
     1
INCLUDE_DIRECTORIES(
ladanyi@538
     2
  ${PROJECT_SOURCE_DIR}
ladanyi@620
     3
  ${PROJECT_BINARY_DIR}
ladanyi@620
     4
)
ladanyi@141
     5
ladanyi@538
     6
LINK_DIRECTORIES(${PROJECT_BINARY_DIR}/lemon)
ladanyi@141
     7
alpar@225
     8
SET(TESTS
deba@488
     9
  adaptors_test
ladanyi@141
    10
  bfs_test
alpar@424
    11
  circulation_test
kpeter@647
    12
  connectivity_test
ladanyi@141
    13
  counter_test
ladanyi@141
    14
  dfs_test
ladanyi@141
    15
  digraph_test
kpeter@170
    16
  dijkstra_test
ladanyi@141
    17
  dim_test
deba@488
    18
  edge_set_test
ladanyi@141
    19
  error_test
ladanyi@506
    20
  euler_test
tapolcai@531
    21
  gomory_hu_test
deba@200
    22
  graph_copy_test
ladanyi@141
    23
  graph_test
kpeter@171
    24
  graph_utils_test
deba@410
    25
  hao_orlin_test
deba@203
    26
  heap_test
ladanyi@141
    27
  kruskal_test
ladanyi@141
    28
  maps_test
kpeter@586
    29
  matching_test
deba@512
    30
  min_cost_arborescence_test
kpeter@593
    31
  min_cost_flow_test
alpar@424
    32
  path_test
alpar@424
    33
  preflow_test
ladanyi@473
    34
  radix_sort_test
alpar@225
    35
  random_test
alpar@424
    36
  suurballe_test
ladanyi@141
    37
  time_measure_test
ladanyi@141
    38
  unionfind_test)
ladanyi@141
    39
ladanyi@622
    40
IF(LEMON_HAVE_LP)
ladanyi@473
    41
  ADD_EXECUTABLE(lp_test lp_test.cc)
ladanyi@612
    42
  SET(LP_TEST_LIBS lemon)
ladanyi@622
    43
  IF(LEMON_HAVE_GLPK)
ladanyi@612
    44
    SET(LP_TEST_LIBS ${LP_TEST_LIBS} ${GLPK_LIBRARIES})
ladanyi@622
    45
  ENDIF(LEMON_HAVE_GLPK)
ladanyi@622
    46
  IF(LEMON_HAVE_CPLEX)
ladanyi@612
    47
    SET(LP_TEST_LIBS ${LP_TEST_LIBS} ${CPLEX_LIBRARIES})
ladanyi@622
    48
  ENDIF(LEMON_HAVE_CPLEX)
ladanyi@622
    49
  IF(LEMON_HAVE_CLP)
ladanyi@613
    50
    SET(LP_TEST_LIBS ${LP_TEST_LIBS} ${COIN_CLP_LIBRARIES})
ladanyi@622
    51
  ENDIF(LEMON_HAVE_CLP)
ladanyi@612
    52
  TARGET_LINK_LIBRARIES(lp_test ${LP_TEST_LIBS})
ladanyi@473
    53
  ADD_TEST(lp_test lp_test)
ladanyi@473
    54
ladanyi@622
    55
  IF(WIN32 AND LEMON_HAVE_GLPK)
ladanyi@473
    56
    GET_TARGET_PROPERTY(TARGET_LOC lp_test LOCATION)
ladanyi@473
    57
    GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH)
ladanyi@473
    58
    ADD_CUSTOM_COMMAND(TARGET lp_test POST_BUILD
ladanyi@473
    59
      COMMAND cmake -E copy ${GLPK_BIN_DIR}/glpk.dll ${TARGET_PATH}
ladanyi@473
    60
      COMMAND cmake -E copy ${GLPK_BIN_DIR}/libltdl3.dll ${TARGET_PATH}
ladanyi@473
    61
      COMMAND cmake -E copy ${GLPK_BIN_DIR}/zlib1.dll ${TARGET_PATH}
ladanyi@473
    62
    )
ladanyi@622
    63
  ENDIF(WIN32 AND LEMON_HAVE_GLPK)
ladanyi@622
    64
  IF(WIN32 AND LEMON_HAVE_CPLEX)
ladanyi@612
    65
    GET_TARGET_PROPERTY(TARGET_LOC lp_test LOCATION)
ladanyi@612
    66
    GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH)
ladanyi@612
    67
    ADD_CUSTOM_COMMAND(TARGET lp_test POST_BUILD
ladanyi@612
    68
      COMMAND cmake -E copy ${CPLEX_BIN_DIR}/cplex91.dll ${TARGET_PATH}
ladanyi@612
    69
    )
ladanyi@622
    70
  ENDIF(WIN32 AND LEMON_HAVE_CPLEX)
ladanyi@622
    71
ENDIF(LEMON_HAVE_LP)
ladanyi@473
    72
ladanyi@622
    73
IF(LEMON_HAVE_MIP)
ladanyi@473
    74
  ADD_EXECUTABLE(mip_test mip_test.cc)
ladanyi@612
    75
  SET(MIP_TEST_LIBS lemon)
ladanyi@622
    76
  IF(LEMON_HAVE_GLPK)
ladanyi@612
    77
    SET(MIP_TEST_LIBS ${MIP_TEST_LIBS} ${GLPK_LIBRARIES})
ladanyi@622
    78
  ENDIF(LEMON_HAVE_GLPK)
ladanyi@622
    79
  IF(LEMON_HAVE_CPLEX)
ladanyi@612
    80
    SET(MIP_TEST_LIBS ${MIP_TEST_LIBS} ${CPLEX_LIBRARIES})
ladanyi@622
    81
  ENDIF(LEMON_HAVE_CPLEX)
ladanyi@622
    82
  IF(LEMON_HAVE_CBC)
ladanyi@613
    83
    SET(MIP_TEST_LIBS ${MIP_TEST_LIBS} ${COIN_CBC_LIBRARIES})
ladanyi@622
    84
  ENDIF(LEMON_HAVE_CBC)
ladanyi@612
    85
  TARGET_LINK_LIBRARIES(mip_test ${MIP_TEST_LIBS})
ladanyi@473
    86
  ADD_TEST(mip_test mip_test)
ladanyi@473
    87
ladanyi@622
    88
  IF(WIN32 AND LEMON_HAVE_GLPK)
ladanyi@473
    89
    GET_TARGET_PROPERTY(TARGET_LOC mip_test LOCATION)
ladanyi@473
    90
    GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH)
ladanyi@473
    91
    ADD_CUSTOM_COMMAND(TARGET mip_test POST_BUILD
ladanyi@473
    92
      COMMAND cmake -E copy ${GLPK_BIN_DIR}/glpk.dll ${TARGET_PATH}
ladanyi@473
    93
      COMMAND cmake -E copy ${GLPK_BIN_DIR}/libltdl3.dll ${TARGET_PATH}
ladanyi@473
    94
      COMMAND cmake -E copy ${GLPK_BIN_DIR}/zlib1.dll ${TARGET_PATH}
ladanyi@473
    95
    )
ladanyi@622
    96
  ENDIF(WIN32 AND LEMON_HAVE_GLPK)
ladanyi@622
    97
  IF(WIN32 AND LEMON_HAVE_CPLEX)
ladanyi@612
    98
    GET_TARGET_PROPERTY(TARGET_LOC mip_test LOCATION)
ladanyi@612
    99
    GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH)
ladanyi@612
   100
    ADD_CUSTOM_COMMAND(TARGET mip_test POST_BUILD
ladanyi@612
   101
      COMMAND cmake -E copy ${CPLEX_BIN_DIR}/cplex91.dll ${TARGET_PATH}
ladanyi@612
   102
    )
ladanyi@622
   103
  ENDIF(WIN32 AND LEMON_HAVE_CPLEX)
ladanyi@622
   104
ENDIF(LEMON_HAVE_MIP)
ladanyi@473
   105
alpar@225
   106
FOREACH(TEST_NAME ${TESTS})
alpar@225
   107
  ADD_EXECUTABLE(${TEST_NAME} ${TEST_NAME}.cc)
alpar@225
   108
  TARGET_LINK_LIBRARIES(${TEST_NAME} lemon)
alpar@225
   109
  ADD_TEST(${TEST_NAME} ${TEST_NAME})
alpar@225
   110
ENDFOREACH(TEST_NAME)