COIN-OR::LEMON - Graph Library

Changeset 627:20dac2104519 in lemon-main for test


Ignore:
Timestamp:
04/28/09 14:51:34 (16 years ago)
Author:
Akos Ladanyi <ladanyi@…>
Branch:
default
Parents:
626:58357e986a08 (diff), 511:8a144437db7d (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Phase:
public
Message:

Merge and extend the fix of #275

Location:
test
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • test/CMakeLists.txt

    r510 r627  
    11INCLUDE_DIRECTORIES(
    2   ${CMAKE_SOURCE_DIR}
     2  ${PROJECT_SOURCE_DIR}
    33  ${PROJECT_BINARY_DIR}
    44)
    55
    6 LINK_DIRECTORIES(${CMAKE_BINARY_DIR}/lemon)
     6LINK_DIRECTORIES(${PROJECT_BINARY_DIR}/lemon)
    77
    88SET(TESTS
     9  adaptors_test
    910  bfs_test
     11  circulation_test
    1012  counter_test
    1113  dfs_test
     
    1315  dijkstra_test
    1416  dim_test
     17  edge_set_test
    1518  error_test
     19  euler_test
     20  gomory_hu_test
    1621  graph_copy_test
    1722  graph_test
    1823  graph_utils_test
     24  hao_orlin_test
    1925  heap_test
    2026  kruskal_test
    2127  maps_test
     28  matching_test
     29  min_cost_arborescence_test
     30  min_cost_flow_test
     31  path_test
     32  preflow_test
     33  radix_sort_test
    2234  random_test
    23   path_test
     35  suurballe_test
    2436  time_measure_test
    2537  unionfind_test)
     38
     39IF(LEMON_HAVE_LP)
     40  ADD_EXECUTABLE(lp_test lp_test.cc)
     41  SET(LP_TEST_LIBS lemon)
     42  IF(LEMON_HAVE_GLPK)
     43    SET(LP_TEST_LIBS ${LP_TEST_LIBS} ${GLPK_LIBRARIES})
     44  ENDIF(LEMON_HAVE_GLPK)
     45  IF(LEMON_HAVE_CPLEX)
     46    SET(LP_TEST_LIBS ${LP_TEST_LIBS} ${CPLEX_LIBRARIES})
     47  ENDIF(LEMON_HAVE_CPLEX)
     48  IF(LEMON_HAVE_CLP)
     49    SET(LP_TEST_LIBS ${LP_TEST_LIBS} ${COIN_CLP_LIBRARIES})
     50  ENDIF(LEMON_HAVE_CLP)
     51  TARGET_LINK_LIBRARIES(lp_test ${LP_TEST_LIBS})
     52  ADD_TEST(lp_test lp_test)
     53
     54  IF(WIN32 AND LEMON_HAVE_GLPK)
     55    GET_TARGET_PROPERTY(TARGET_LOC lp_test LOCATION)
     56    GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH)
     57    ADD_CUSTOM_COMMAND(TARGET lp_test POST_BUILD
     58      COMMAND cmake -E copy ${GLPK_BIN_DIR}/glpk.dll ${TARGET_PATH}
     59      COMMAND cmake -E copy ${GLPK_BIN_DIR}/libltdl3.dll ${TARGET_PATH}
     60      COMMAND cmake -E copy ${GLPK_BIN_DIR}/zlib1.dll ${TARGET_PATH}
     61    )
     62  ENDIF(WIN32 AND LEMON_HAVE_GLPK)
     63  IF(WIN32 AND LEMON_HAVE_CPLEX)
     64    GET_TARGET_PROPERTY(TARGET_LOC lp_test LOCATION)
     65    GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH)
     66    ADD_CUSTOM_COMMAND(TARGET lp_test POST_BUILD
     67      COMMAND cmake -E copy ${CPLEX_BIN_DIR}/cplex91.dll ${TARGET_PATH}
     68    )
     69  ENDIF(WIN32 AND LEMON_HAVE_CPLEX)
     70ENDIF(LEMON_HAVE_LP)
     71
     72IF(LEMON_HAVE_MIP)
     73  ADD_EXECUTABLE(mip_test mip_test.cc)
     74  SET(MIP_TEST_LIBS lemon)
     75  IF(LEMON_HAVE_GLPK)
     76    SET(MIP_TEST_LIBS ${MIP_TEST_LIBS} ${GLPK_LIBRARIES})
     77  ENDIF(LEMON_HAVE_GLPK)
     78  IF(LEMON_HAVE_CPLEX)
     79    SET(MIP_TEST_LIBS ${MIP_TEST_LIBS} ${CPLEX_LIBRARIES})
     80  ENDIF(LEMON_HAVE_CPLEX)
     81  IF(LEMON_HAVE_CBC)
     82    SET(MIP_TEST_LIBS ${MIP_TEST_LIBS} ${COIN_CBC_LIBRARIES})
     83  ENDIF(LEMON_HAVE_CBC)
     84  TARGET_LINK_LIBRARIES(mip_test ${MIP_TEST_LIBS})
     85  ADD_TEST(mip_test mip_test)
     86
     87  IF(WIN32 AND LEMON_HAVE_GLPK)
     88    GET_TARGET_PROPERTY(TARGET_LOC mip_test LOCATION)
     89    GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH)
     90    ADD_CUSTOM_COMMAND(TARGET mip_test POST_BUILD
     91      COMMAND cmake -E copy ${GLPK_BIN_DIR}/glpk.dll ${TARGET_PATH}
     92      COMMAND cmake -E copy ${GLPK_BIN_DIR}/libltdl3.dll ${TARGET_PATH}
     93      COMMAND cmake -E copy ${GLPK_BIN_DIR}/zlib1.dll ${TARGET_PATH}
     94    )
     95  ENDIF(WIN32 AND LEMON_HAVE_GLPK)
     96  IF(WIN32 AND LEMON_HAVE_CPLEX)
     97    GET_TARGET_PROPERTY(TARGET_LOC mip_test LOCATION)
     98    GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH)
     99    ADD_CUSTOM_COMMAND(TARGET mip_test POST_BUILD
     100      COMMAND cmake -E copy ${CPLEX_BIN_DIR}/cplex91.dll ${TARGET_PATH}
     101    )
     102  ENDIF(WIN32 AND LEMON_HAVE_CPLEX)
     103ENDIF(LEMON_HAVE_MIP)
    26104
    27105FOREACH(TEST_NAME ${TESTS})
  • test/CMakeLists.txt

    r621 r627  
    3737  unionfind_test)
    3838
    39 IF(HAVE_LP)
     39IF(LEMON_HAVE_LP)
    4040  ADD_EXECUTABLE(lp_test lp_test.cc)
    4141  SET(LP_TEST_LIBS lemon)
    42   IF(HAVE_GLPK)
     42  IF(LEMON_HAVE_GLPK)
    4343    SET(LP_TEST_LIBS ${LP_TEST_LIBS} ${GLPK_LIBRARIES})
    44   ENDIF(HAVE_GLPK)
    45   IF(HAVE_CPLEX)
     44  ENDIF(LEMON_HAVE_GLPK)
     45  IF(LEMON_HAVE_CPLEX)
    4646    SET(LP_TEST_LIBS ${LP_TEST_LIBS} ${CPLEX_LIBRARIES})
    47   ENDIF(HAVE_CPLEX)
    48   IF(HAVE_CLP)
     47  ENDIF(LEMON_HAVE_CPLEX)
     48  IF(LEMON_HAVE_CLP)
    4949    SET(LP_TEST_LIBS ${LP_TEST_LIBS} ${COIN_CLP_LIBRARIES})
    50   ENDIF(HAVE_CLP)
     50  ENDIF(LEMON_HAVE_CLP)
    5151  TARGET_LINK_LIBRARIES(lp_test ${LP_TEST_LIBS})
    5252  ADD_TEST(lp_test lp_test)
    5353
    54   IF(WIN32 AND HAVE_GLPK)
     54  IF(WIN32 AND LEMON_HAVE_GLPK)
    5555    GET_TARGET_PROPERTY(TARGET_LOC lp_test LOCATION)
    5656    GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH)
     
    6060      COMMAND cmake -E copy ${GLPK_BIN_DIR}/zlib1.dll ${TARGET_PATH}
    6161    )
    62   ENDIF(WIN32 AND HAVE_GLPK)
    63   IF(WIN32 AND HAVE_CPLEX)
     62  ENDIF(WIN32 AND LEMON_HAVE_GLPK)
     63  IF(WIN32 AND LEMON_HAVE_CPLEX)
    6464    GET_TARGET_PROPERTY(TARGET_LOC lp_test LOCATION)
    6565    GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH)
     
    6767      COMMAND cmake -E copy ${CPLEX_BIN_DIR}/cplex91.dll ${TARGET_PATH}
    6868    )
    69   ENDIF(WIN32 AND HAVE_CPLEX)
    70 ENDIF(HAVE_LP)
     69  ENDIF(WIN32 AND LEMON_HAVE_CPLEX)
     70ENDIF(LEMON_HAVE_LP)
    7171
    72 IF(HAVE_MIP)
     72IF(LEMON_HAVE_MIP)
    7373  ADD_EXECUTABLE(mip_test mip_test.cc)
    7474  SET(MIP_TEST_LIBS lemon)
    75   IF(HAVE_GLPK)
     75  IF(LEMON_HAVE_GLPK)
    7676    SET(MIP_TEST_LIBS ${MIP_TEST_LIBS} ${GLPK_LIBRARIES})
    77   ENDIF(HAVE_GLPK)
    78   IF(HAVE_CPLEX)
     77  ENDIF(LEMON_HAVE_GLPK)
     78  IF(LEMON_HAVE_CPLEX)
    7979    SET(MIP_TEST_LIBS ${MIP_TEST_LIBS} ${CPLEX_LIBRARIES})
    80   ENDIF(HAVE_CPLEX)
    81   IF(HAVE_CBC)
     80  ENDIF(LEMON_HAVE_CPLEX)
     81  IF(LEMON_HAVE_CBC)
    8282    SET(MIP_TEST_LIBS ${MIP_TEST_LIBS} ${COIN_CBC_LIBRARIES})
    83   ENDIF(HAVE_CBC)
     83  ENDIF(LEMON_HAVE_CBC)
    8484  TARGET_LINK_LIBRARIES(mip_test ${MIP_TEST_LIBS})
    8585  ADD_TEST(mip_test mip_test)
    8686
    87   IF(WIN32 AND HAVE_GLPK)
     87  IF(WIN32 AND LEMON_HAVE_GLPK)
    8888    GET_TARGET_PROPERTY(TARGET_LOC mip_test LOCATION)
    8989    GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH)
     
    9393      COMMAND cmake -E copy ${GLPK_BIN_DIR}/zlib1.dll ${TARGET_PATH}
    9494    )
    95   ENDIF(WIN32 AND HAVE_GLPK)
    96   IF(WIN32 AND HAVE_CPLEX)
     95  ENDIF(WIN32 AND LEMON_HAVE_GLPK)
     96  IF(WIN32 AND LEMON_HAVE_CPLEX)
    9797    GET_TARGET_PROPERTY(TARGET_LOC mip_test LOCATION)
    9898    GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH)
     
    100100      COMMAND cmake -E copy ${CPLEX_BIN_DIR}/cplex91.dll ${TARGET_PATH}
    101101    )
    102   ENDIF(WIN32 AND HAVE_CPLEX)
    103 ENDIF(HAVE_MIP)
     102  ENDIF(WIN32 AND LEMON_HAVE_CPLEX)
     103ENDIF(LEMON_HAVE_MIP)
    104104
    105105FOREACH(TEST_NAME ${TESTS})
  • test/lp_test.cc

    r575 r627  
    2626#endif
    2727
    28 #ifdef HAVE_GLPK
     28#ifdef LEMON_HAVE_GLPK
    2929#include <lemon/glpk.h>
    3030#endif
    3131
    32 #ifdef HAVE_CPLEX
     32#ifdef LEMON_HAVE_CPLEX
    3333#include <lemon/cplex.h>
    3434#endif
    3535
    36 #ifdef HAVE_SOPLEX
     36#ifdef LEMON_HAVE_SOPLEX
    3737#include <lemon/soplex.h>
    3838#endif
    3939
    40 #ifdef HAVE_CLP
     40#ifdef LEMON_HAVE_CLP
    4141#include <lemon/clp.h>
    4242#endif
     
    380380  lpTest(lp_skel);
    381381
    382 #ifdef HAVE_GLPK
     382#ifdef LEMON_HAVE_GLPK
    383383  {
    384384    GlpkLp lp_glpk1,lp_glpk2;
     
    389389#endif
    390390
    391 #ifdef HAVE_CPLEX
     391#ifdef LEMON_HAVE_CPLEX
    392392  try {
    393393    CplexLp lp_cplex1,lp_cplex2;
     
    400400#endif
    401401
    402 #ifdef HAVE_SOPLEX
     402#ifdef LEMON_HAVE_SOPLEX
    403403  {
    404404    SoplexLp lp_soplex1,lp_soplex2;
     
    409409#endif
    410410
    411 #ifdef HAVE_CLP
     411#ifdef LEMON_HAVE_CLP
    412412  {
    413413    ClpLp lp_clp1,lp_clp2;
  • test/mip_test.cc

    r575 r627  
    2323#endif
    2424
    25 #ifdef HAVE_CPLEX
     25#ifdef LEMON_HAVE_CPLEX
    2626#include <lemon/cplex.h>
    2727#endif
    2828
    29 #ifdef HAVE_GLPK
     29#ifdef LEMON_HAVE_GLPK
    3030#include <lemon/glpk.h>
    3131#endif
    3232
    33 #ifdef HAVE_CBC
     33#ifdef LEMON_HAVE_CBC
    3434#include <lemon/cbc.h>
    3535#endif
     
    130130{
    131131
    132 #ifdef HAVE_GLPK
     132#ifdef LEMON_HAVE_GLPK
    133133  {
    134134    GlpkMip mip1;
     
    138138#endif
    139139
    140 #ifdef HAVE_CPLEX
     140#ifdef LEMON_HAVE_CPLEX
    141141  try {
    142142    CplexMip mip2;
     
    148148#endif
    149149
    150 #ifdef HAVE_CBC
     150#ifdef LEMON_HAVE_CBC
    151151  {
    152152    CbcMip mip1;
Note: See TracChangeset for help on using the changeset viewer.