COIN-OR::LEMON - Graph Library

Changes in / [643:f3792d5bb294:644:8d289c89d43e] in lemon-main


Ignore:
Files:
22 edited

Legend:

Unmodified
Added
Removed
  • CMakeLists.txt

    r621 r631  
    1818FIND_PACKAGE(COIN)
    1919
    20 ADD_DEFINITIONS(-DHAVE_CONFIG_H)
    21 
    2220IF(MSVC)
    2321  SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4250 /wd4355 /wd4800 /wd4996")
     
    3028
    3129INCLUDE(CheckTypeSize)
    32 CHECK_TYPE_SIZE("long long" LONG_LONG)
     30CHECK_TYPE_SIZE("long long" LEMON_LONG_LONG)
    3331
    3432ENABLE_TESTING()
  • Makefile.am

    r567 r629  
    1212        m4/lx_check_glpk.m4 \
    1313        m4/lx_check_soplex.m4 \
    14         m4/lx_check_clp.m4 \
    15         m4/lx_check_cbc.m4 \
     14        m4/lx_check_coin.m4 \
    1615        CMakeLists.txt \
    1716        cmake/FindGhostscript.cmake \
     17        cmake/FindCPLEX.cmake \
    1818        cmake/FindGLPK.cmake \
     19        cmake/FindCOIN.cmake \
    1920        cmake/version.cmake.in \
    2021        cmake/version.cmake \
  • cmake/FindCOIN.cmake

    r621 r634  
    22
    33FIND_PATH(COIN_INCLUDE_DIR coin/CoinUtilsConfig.h
    4   PATHS ${COIN_ROOT_DIR}/include)
    5 
    6 FIND_LIBRARY(COIN_CBC_LIBRARY libCbc
    7   PATHS ${COIN_ROOT_DIR}/lib)
    8 FIND_LIBRARY(COIN_CBC_SOLVER_LIBRARY libCbcSolver
    9   PATHS ${COIN_ROOT_DIR}/lib)
    10 FIND_LIBRARY(COIN_CGL_LIBRARY libCgl
    11   PATHS ${COIN_ROOT_DIR}/lib)
    12 FIND_LIBRARY(COIN_CLP_LIBRARY libClp
    13   PATHS ${COIN_ROOT_DIR}/lib)
    14 FIND_LIBRARY(COIN_COIN_UTILS_LIBRARY libCoinUtils
    15   PATHS ${COIN_ROOT_DIR}/lib)
    16 FIND_LIBRARY(COIN_OSI_LIBRARY libOsi
    17   PATHS ${COIN_ROOT_DIR}/lib)
    18 FIND_LIBRARY(COIN_OSI_CBC_LIBRARY libOsiCbc
    19   PATHS ${COIN_ROOT_DIR}/lib)
    20 FIND_LIBRARY(COIN_OSI_CLP_LIBRARY libOsiClp
    21   PATHS ${COIN_ROOT_DIR}/lib)
    22 FIND_LIBRARY(COIN_OSI_VOL_LIBRARY libOsiVol
    23   PATHS ${COIN_ROOT_DIR}/lib)
    24 FIND_LIBRARY(COIN_VOL_LIBRARY libVol
    25   PATHS ${COIN_ROOT_DIR}/lib)
     4  HINTS ${COIN_ROOT_DIR}/include
     5)
     6FIND_LIBRARY(COIN_CBC_LIBRARY
     7  NAMES Cbc libCbc
     8  HINTS ${COIN_ROOT_DIR}/lib
     9)
     10FIND_LIBRARY(COIN_CBC_SOLVER_LIBRARY
     11  NAMES CbcSolver libCbcSolver
     12  HINTS ${COIN_ROOT_DIR}/lib
     13)
     14FIND_LIBRARY(COIN_CGL_LIBRARY
     15  NAMES Cgl libCgl
     16  HINTS ${COIN_ROOT_DIR}/lib
     17)
     18FIND_LIBRARY(COIN_CLP_LIBRARY
     19  NAMES Clp libClp
     20  HINTS ${COIN_ROOT_DIR}/lib
     21)
     22FIND_LIBRARY(COIN_COIN_UTILS_LIBRARY
     23  NAMES CoinUtils libCoinUtils
     24  HINTS ${COIN_ROOT_DIR}/lib
     25)
     26FIND_LIBRARY(COIN_OSI_LIBRARY
     27  NAMES Osi libOsi
     28  HINTS ${COIN_ROOT_DIR}/lib
     29)
     30FIND_LIBRARY(COIN_OSI_CBC_LIBRARY
     31  NAMES OsiCbc libOsiCbc
     32  HINTS ${COIN_ROOT_DIR}/lib
     33)
     34FIND_LIBRARY(COIN_OSI_CLP_LIBRARY
     35  NAMES OsiClp libOsiClp
     36  HINTS ${COIN_ROOT_DIR}/lib
     37)
     38FIND_LIBRARY(COIN_OSI_VOL_LIBRARY
     39  NAMES OsiVol libOsiVol
     40  HINTS ${COIN_ROOT_DIR}/lib
     41)
     42FIND_LIBRARY(COIN_VOL_LIBRARY
     43  NAMES Vol libVol
     44  HINTS ${COIN_ROOT_DIR}/lib
     45)
    2646
    2747INCLUDE(FindPackageHandleStandardArgs)
     
    6282
    6383IF(COIN_FOUND)
    64   SET(HAVE_LP TRUE)
    65   SET(HAVE_MIP TRUE)
    66   SET(HAVE_CLP TRUE)
    67   SET(HAVE_CBC TRUE)
     84  SET(LEMON_HAVE_LP TRUE)
     85  SET(LEMON_HAVE_MIP TRUE)
     86  SET(LEMON_HAVE_CLP TRUE)
     87  SET(LEMON_HAVE_CBC TRUE)
    6888ENDIF(COIN_FOUND)
  • cmake/FindCPLEX.cmake

    r620 r636  
     1SET(CPLEX_ROOT_DIR "" CACHE PATH "CPLEX root directory")
     2
    13FIND_PATH(CPLEX_INCLUDE_DIR
    24  ilcplex/cplex.h
    3   PATHS "C:/ILOG/CPLEX91/include")
    4 
     5  PATHS "C:/ILOG/CPLEX91/include"
     6  PATHS "/opt/ilog/cplex91/include"
     7  HINTS ${CPLEX_ROOT_DIR}/include
     8)
    59FIND_LIBRARY(CPLEX_LIBRARY
    6   NAMES cplex91
    7   PATHS "C:/ILOG/CPLEX91/lib/msvc7/stat_mda")
     10  cplex91
     11  PATHS "C:/ILOG/CPLEX91/lib/msvc7/stat_mda"
     12  PATHS "/opt/ilog/cplex91/bin"
     13  HINTS ${CPLEX_ROOT_DIR}/bin
     14)
    815
    916INCLUDE(FindPackageHandleStandardArgs)
     
    1219FIND_PATH(CPLEX_BIN_DIR
    1320  cplex91.dll
    14   PATHS "C:/ILOG/CPLEX91/bin/x86_win32")
     21  PATHS "C:/ILOG/CPLEX91/bin/x86_win32"
     22)
    1523
    1624IF(CPLEX_FOUND)
    1725  SET(CPLEX_INCLUDE_DIRS ${CPLEX_INCLUDE_DIR})
    1826  SET(CPLEX_LIBRARIES ${CPLEX_LIBRARY})
     27  IF(CMAKE_SYSTEM_NAME STREQUAL "Linux")
     28    SET(CPLEX_LIBRARIES "${CPLEX_LIBRARIES};m;pthread")
     29  ENDIF(CMAKE_SYSTEM_NAME STREQUAL "Linux")
    1930ENDIF(CPLEX_FOUND)
    2031
     
    2233
    2334IF(CPLEX_FOUND)
    24   SET(HAVE_LP TRUE)
    25   SET(HAVE_MIP TRUE)
    26   SET(HAVE_CPLEX TRUE)
     35  SET(LEMON_HAVE_LP TRUE)
     36  SET(LEMON_HAVE_MIP TRUE)
     37  SET(LEMON_HAVE_CPLEX TRUE)
    2738ENDIF(CPLEX_FOUND)
  • cmake/FindGLPK.cmake

    r619 r638  
     1SET(GLPK_ROOT_DIR "" CACHE PATH "GLPK root directory")
     2
    13SET(GLPK_REGKEY "[HKEY_LOCAL_MACHINE\\SOFTWARE\\GnuWin32\\Glpk;InstallPath]")
    24GET_FILENAME_COMPONENT(GLPK_ROOT_PATH ${GLPK_REGKEY} ABSOLUTE)
     
    46FIND_PATH(GLPK_INCLUDE_DIR
    57  glpk.h
    6   PATHS ${GLPK_REGKEY}/include)
     8  PATHS ${GLPK_REGKEY}/include
     9  HINTS ${GLPK_ROOT_DIR}/include
     10)
     11FIND_LIBRARY(GLPK_LIBRARY
     12  glpk
     13  PATHS ${GLPK_REGKEY}/lib
     14  HINTS ${GLPK_ROOT_DIR}/lib
     15)
    716
    8 FIND_LIBRARY(GLPK_LIBRARY
    9   NAMES glpk
    10   PATHS ${GLPK_REGKEY}/lib)
     17IF(GLPK_INCLUDE_DIR AND GLPK_LIBRARY)
     18  FILE(READ ${GLPK_INCLUDE_DIR}/glpk.h GLPK_GLPK_H)
     19
     20  STRING(REGEX MATCH "define[ ]+GLP_MAJOR_VERSION[ ]+[0-9]+" GLPK_MAJOR_VERSION_LINE "${GLPK_GLPK_H}")
     21  STRING(REGEX REPLACE "define[ ]+GLP_MAJOR_VERSION[ ]+([0-9]+)" "\\1" GLPK_VERSION_MAJOR "${GLPK_MAJOR_VERSION_LINE}")
     22
     23  STRING(REGEX MATCH "define[ ]+GLP_MINOR_VERSION[ ]+[0-9]+" GLPK_MINOR_VERSION_LINE "${GLPK_GLPK_H}")
     24  STRING(REGEX REPLACE "define[ ]+GLP_MINOR_VERSION[ ]+([0-9]+)" "\\1" GLPK_VERSION_MINOR "${GLPK_MINOR_VERSION_LINE}")
     25
     26  SET(GLPK_VERSION_STRING "${GLPK_VERSION_MAJOR}.${GLPK_VERSION_MINOR}")
     27
     28  IF(GLPK_FIND_VERSION)
     29    IF(GLPK_FIND_VERSION_COUNT GREATER 2)
     30      MESSAGE(SEND_ERROR "unexpected version string")
     31    ENDIF(GLPK_FIND_VERSION_COUNT GREATER 2)
     32
     33    MATH(EXPR GLPK_REQUESTED_VERSION "${GLPK_FIND_VERSION_MAJOR}*100 + ${GLPK_FIND_VERSION_MINOR}")
     34    MATH(EXPR GLPK_FOUND_VERSION "${GLPK_VERSION_MAJOR}*100 + ${GLPK_VERSION_MINOR}")
     35
     36    IF(GLPK_FOUND_VERSION LESS GLPK_REQUESTED_VERSION)
     37      SET(GLPK_PROPER_VERSION_FOUND FALSE)
     38    ELSE(GLPK_FOUND_VERSION LESS GLPK_REQUESTED_VERSION)
     39      SET(GLPK_PROPER_VERSION_FOUND TRUE)
     40    ENDIF(GLPK_FOUND_VERSION LESS GLPK_REQUESTED_VERSION)
     41  ELSE(GLPK_FIND_VERSION)
     42    SET(GLPK_PROPER_VERSION_FOUND TRUE)
     43  ENDIF(GLPK_FIND_VERSION)
     44ENDIF(GLPK_INCLUDE_DIR AND GLPK_LIBRARY)
    1145
    1246INCLUDE(FindPackageHandleStandardArgs)
    13 FIND_PACKAGE_HANDLE_STANDARD_ARGS(GLPK DEFAULT_MSG GLPK_LIBRARY GLPK_INCLUDE_DIR)
     47FIND_PACKAGE_HANDLE_STANDARD_ARGS(GLPK DEFAULT_MSG GLPK_LIBRARY GLPK_INCLUDE_DIR GLPK_PROPER_VERSION_FOUND)
    1448
    1549IF(GLPK_FOUND)
     
    2256
    2357IF(GLPK_FOUND)
    24   SET(HAVE_LP TRUE)
    25   SET(HAVE_MIP TRUE)
    26   SET(HAVE_GLPK TRUE)
     58  SET(LEMON_HAVE_LP TRUE)
     59  SET(LEMON_HAVE_MIP TRUE)
     60  SET(LEMON_HAVE_GLPK TRUE)
    2761ENDIF(GLPK_FOUND)
  • configure.ac

    r568 r627  
    2626AC_CHECK_TYPE(long long, [long_long_found=yes], [long_long_found=no])
    2727if test x"$long_long_found" = x"yes"; then
    28   AC_DEFINE([HAVE_LONG_LONG], [1], [Define to 1 if you have long long.])
     28  AC_DEFINE([LEMON_HAVE_LONG_LONG], [1], [Define to 1 if you have long long.])
    2929fi
    3030
  • lemon/CMakeLists.txt

    r621 r627  
    1919)
    2020
    21 IF(HAVE_GLPK)
     21IF(LEMON_HAVE_GLPK)
    2222  SET(LEMON_SOURCES ${LEMON_SOURCES} glpk.cc)
    2323  INCLUDE_DIRECTORIES(${GLPK_INCLUDE_DIRS})
     
    2727    INSTALL(FILES ${GLPK_BIN_DIR}/zlib1.dll DESTINATION bin)
    2828  ENDIF(WIN32)
    29 ENDIF(HAVE_GLPK)
     29ENDIF(LEMON_HAVE_GLPK)
    3030
    31 IF(HAVE_CPLEX)
     31IF(LEMON_HAVE_CPLEX)
    3232  SET(LEMON_SOURCES ${LEMON_SOURCES} cplex.cc)
    3333  INCLUDE_DIRECTORIES(${CPLEX_INCLUDE_DIRS})
    34 ENDIF(HAVE_CPLEX)
     34ENDIF(LEMON_HAVE_CPLEX)
    3535
    36 IF(HAVE_CLP)
     36IF(LEMON_HAVE_CLP)
    3737  SET(LEMON_SOURCES ${LEMON_SOURCES} clp.cc)
    3838  INCLUDE_DIRECTORIES(${COIN_INCLUDE_DIRS})
    39 ENDIF(HAVE_CLP)
     39ENDIF(LEMON_HAVE_CLP)
    4040
    41 IF(HAVE_CBC)
     41IF(LEMON_HAVE_CBC)
    4242  SET(LEMON_SOURCES ${LEMON_SOURCES} cbc.cc)
    4343  INCLUDE_DIRECTORIES(${COIN_INCLUDE_DIRS})
    44 ENDIF(HAVE_CBC)
     44ENDIF(LEMON_HAVE_CBC)
    4545
    4646ADD_LIBRARY(lemon ${LEMON_SOURCES})
     
    5656  COMPONENT headers
    5757  FILES_MATCHING PATTERN "*.h")
     58
     59INSTALL(
     60  FILES ${CMAKE_CURRENT_BINARY_DIR}/config.h
     61  DESTINATION include/lemon
     62  COMPONENT headers)
  • lemon/Makefile.am

    r611 r639  
    1616        lemon/bits/windows.cc
    1717
    18 
     18nodist_lemon_HEADERS = lemon/config.h   
     19       
    1920lemon_libemon_la_CXXFLAGS = \
    2021        $(AM_CXXFLAGS) \
     
    5859        lemon/bfs.h \
    5960        lemon/bin_heap.h \
     61        lemon/cbc.h \
    6062        lemon/circulation.h \
    6163        lemon/clp.h \
  • lemon/bits/default_map.h

    r617 r627  
    9898
    9999
    100 #if defined HAVE_LONG_LONG
     100#if defined LEMON_HAVE_LONG_LONG
    101101
    102102  // long long
  • lemon/config.h.cmake

    r621 r627  
    1 #cmakedefine HAVE_LONG_LONG 1
    2 #cmakedefine HAVE_LP 1
    3 #cmakedefine HAVE_MIP 1
    4 #cmakedefine HAVE_GLPK 1
    5 #cmakedefine HAVE_CPLEX 1
    6 #cmakedefine HAVE_CLP 1
    7 #cmakedefine HAVE_CBC 1
     1#cmakedefine LEMON_HAVE_LONG_LONG 1
     2#cmakedefine LEMON_HAVE_LP 1
     3#cmakedefine LEMON_HAVE_MIP 1
     4#cmakedefine LEMON_HAVE_GLPK 1
     5#cmakedefine LEMON_HAVE_CPLEX 1
     6#cmakedefine LEMON_HAVE_CLP 1
     7#cmakedefine LEMON_HAVE_CBC 1
  • lemon/config.h.in

    r567 r627  
    11/* Define to 1 if you have long long */
    2 #undef HAVE_LONG_LONG
     2#undef LEMON_HAVE_LONG_LONG
    33
    44/* Define to 1 if you have any LP solver. */
    5 #undef HAVE_LP
     5#undef LEMON_HAVE_LP
    66
    77/* Define to 1 if you have any MIP solver. */
    8 #undef HAVE_MIP
     8#undef LEMON_HAVE_MIP
    99
    1010/* Define to 1 if you have CPLEX. */
    11 #undef HAVE_CPLEX
     11#undef LEMON_HAVE_CPLEX
    1212
    1313/* Define to 1 if you have GLPK. */
    14 #undef HAVE_GLPK
     14#undef LEMON_HAVE_GLPK
    1515
    1616/* Define to 1 if you have SOPLEX */
    17 #undef HAVE_SOPLEX
     17#undef LEMON_HAVE_SOPLEX
    1818
    1919/* Define to 1 if you have CLP */
    20 #undef HAVE_CLP
     20#undef LEMON_HAVE_CLP
    2121
    2222/* Define to 1 if you have CBC */
    23 #undef HAVE_CBC
     23#undef LEMON_HAVE_CBC
  • lemon/core.h

    r617 r639  
    2323#include <algorithm>
    2424
    25 #include <lemon/core.h>
     25#include <lemon/config.h>
    2626#include <lemon/bits/enable_if.h>
    2727#include <lemon/bits/traits.h>
  • lemon/lp.h

    r462 r627  
    2323
    2424
    25 #ifdef HAVE_GLPK
     25#ifdef LEMON_HAVE_GLPK
    2626#include <lemon/glpk.h>
    27 #elif HAVE_CPLEX
     27#elif LEMON_HAVE_CPLEX
    2828#include <lemon/cplex.h>
    29 #elif HAVE_SOPLEX
     29#elif LEMON_HAVE_SOPLEX
    3030#include <lemon/soplex.h>
    31 #elif HAVE_CLP
     31#elif LEMON_HAVE_CLP
    3232#include <lemon/clp.h>
    3333#endif
     
    7070  typedef GlpkMip Mip;
    7171#else
    72 #ifdef HAVE_GLPK
     72#ifdef LEMON_HAVE_GLPK
    7373# define LEMON_DEFAULT_LP GLPK
    7474  typedef GlpkLp Lp;
    7575# define LEMON_DEFAULT_MIP GLPK
    7676  typedef GlpkMip Mip;
    77 #elif HAVE_CPLEX
     77#elif LEMON_HAVE_CPLEX
    7878# define LEMON_DEFAULT_LP CPLEX
    7979  typedef CplexLp Lp;
    8080# define LEMON_DEFAULT_MIP CPLEX
    8181  typedef CplexMip Mip;
    82 #elif HAVE_SOPLEX
     82#elif LEMON_HAVE_SOPLEX
    8383# define DEFAULT_LP SOPLEX
    8484  typedef SoplexLp Lp;
    85 #elif HAVE_CLP
     85#elif LEMON_HAVE_CLP
    8686# define DEFAULT_LP CLP
    8787  typedef ClpLp Lp; 
  • m4/lx_check_coin.m4

    r568 r627  
    5656
    5757    if test x"$lx_clp_found" = x"yes"; then
    58       AC_DEFINE([HAVE_CLP], [1], [Define to 1 if you have CLP.])
     58      AC_DEFINE([LEMON_HAVE_CLP], [1], [Define to 1 if you have CLP.])
    5959      lx_lp_found=yes
    60       AC_DEFINE([HAVE_LP], [1], [Define to 1 if you have any LP solver.])
     60      AC_DEFINE([LEMON_HAVE_LP], [1], [Define to 1 if you have any LP solver.])
    6161      AC_MSG_RESULT([yes])
    6262    else
     
    116116
    117117      if test x"$lx_cbc_found" = x"yes"; then
    118         AC_DEFINE([HAVE_CBC], [1], [Define to 1 if you have CBC.])
     118        AC_DEFINE([LEMON_HAVE_CBC], [1], [Define to 1 if you have CBC.])
    119119        lx_lp_found=yes
    120         AC_DEFINE([HAVE_LP], [1], [Define to 1 if you have any LP solver.])
     120        AC_DEFINE([LEMON_HAVE_LP], [1], [Define to 1 if you have any LP solver.])
    121121        lx_mip_found=yes
    122         AC_DEFINE([HAVE_MIP], [1], [Define to 1 if you have any MIP solver.])
     122        AC_DEFINE([LEMON_HAVE_MIP], [1], [Define to 1 if you have any MIP solver.])
    123123        AC_MSG_RESULT([yes])
    124124      else
  • m4/lx_check_cplex.m4

    r457 r627  
    6262
    6363    if test x"$lx_cplex_found" = x"yes"; then
    64       AC_DEFINE([HAVE_CPLEX], [1], [Define to 1 if you have CPLEX.])
     64      AC_DEFINE([LEMON_HAVE_CPLEX], [1], [Define to 1 if you have CPLEX.])
    6565      lx_lp_found=yes
    66       AC_DEFINE([HAVE_LP], [1], [Define to 1 if you have any LP solver.])
     66      AC_DEFINE([LEMON_HAVE_LP], [1], [Define to 1 if you have any LP solver.])
    6767      lx_mip_found=yes
    68       AC_DEFINE([HAVE_MIP], [1], [Define to 1 if you have any MIP solver.])
     68      AC_DEFINE([LEMON_HAVE_MIP], [1], [Define to 1 if you have any MIP solver.])
    6969      AC_MSG_RESULT([yes])
    7070    else
  • m4/lx_check_glpk.m4

    r459 r627  
    6565
    6666    if test x"$lx_glpk_found" = x"yes"; then
    67       AC_DEFINE([HAVE_GLPK], [1], [Define to 1 if you have GLPK.])
     67      AC_DEFINE([LEMON_HAVE_GLPK], [1], [Define to 1 if you have GLPK.])
    6868      lx_lp_found=yes
    69       AC_DEFINE([HAVE_LP], [1], [Define to 1 if you have any LP solver.])
     69      AC_DEFINE([LEMON_HAVE_LP], [1], [Define to 1 if you have any LP solver.])
    7070      lx_mip_found=yes
    71       AC_DEFINE([HAVE_MIP], [1], [Define to 1 if you have any MIP solver.])
     71      AC_DEFINE([LEMON_HAVE_MIP], [1], [Define to 1 if you have any MIP solver.])
    7272      AC_MSG_RESULT([yes])
    7373    else
  • m4/lx_check_soplex.m4

    r539 r627  
    5656
    5757    if test x"$lx_soplex_found" = x"yes"; then
    58       AC_DEFINE([HAVE_SOPLEX], [1], [Define to 1 if you have SOPLEX.])
     58      AC_DEFINE([LEMON_HAVE_SOPLEX], [1], [Define to 1 if you have SOPLEX.])
    5959      lx_lp_found=yes
    60       AC_DEFINE([HAVE_LP], [1], [Define to 1 if you have any LP solver.])
     60      AC_DEFINE([LEMON_HAVE_LP], [1], [Define to 1 if you have any LP solver.])
    6161      AC_MSG_RESULT([yes])
    6262    else
  • scripts/unify-sources.sh

    r554 r628  
    11#!/bin/bash
    22
    3 YEAR=`date +2003-%Y`
     3YEAR=`date +%Y`
    44HGROOT=`hg root`
     5
     6function hg_year() {
     7    if [ -n "$(hg st $1)" ]; then
     8        echo $YEAR
     9}
    510
    611# file enumaration modes
     
    192197 * This file is a part of LEMON, a generic C++ optimization library.
    193198 *
    194  * Copyright (C) "$YEAR"
     199 * Copyright (C) 2003-"$(hg_year $1)"
    195200 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
    196201 * (Egervary Research Group on Combinatorial Optimization, EGRES).
  • 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 r631  
    2222#include <lemon/tolerance.h>
    2323
    24 #ifdef HAVE_CONFIG_H
    2524#include <lemon/config.h>
    26 #endif
    27 
    28 #ifdef HAVE_GLPK
     25
     26#ifdef LEMON_HAVE_GLPK
    2927#include <lemon/glpk.h>
    3028#endif
    3129
    32 #ifdef HAVE_CPLEX
     30#ifdef LEMON_HAVE_CPLEX
    3331#include <lemon/cplex.h>
    3432#endif
    3533
    36 #ifdef HAVE_SOPLEX
     34#ifdef LEMON_HAVE_SOPLEX
    3735#include <lemon/soplex.h>
    3836#endif
    3937
    40 #ifdef HAVE_CLP
     38#ifdef LEMON_HAVE_CLP
    4139#include <lemon/clp.h>
    4240#endif
     
    380378  lpTest(lp_skel);
    381379
    382 #ifdef HAVE_GLPK
     380#ifdef LEMON_HAVE_GLPK
    383381  {
    384382    GlpkLp lp_glpk1,lp_glpk2;
     
    389387#endif
    390388
    391 #ifdef HAVE_CPLEX
     389#ifdef LEMON_HAVE_CPLEX
    392390  try {
    393391    CplexLp lp_cplex1,lp_cplex2;
     
    400398#endif
    401399
    402 #ifdef HAVE_SOPLEX
     400#ifdef LEMON_HAVE_SOPLEX
    403401  {
    404402    SoplexLp lp_soplex1,lp_soplex2;
     
    409407#endif
    410408
    411 #ifdef HAVE_CLP
     409#ifdef LEMON_HAVE_CLP
    412410  {
    413411    ClpLp lp_clp1,lp_clp2;
  • test/mip_test.cc

    r575 r631  
    1919#include "test_tools.h"
    2020
    21 #ifdef HAVE_CONFIG_H
    2221#include <lemon/config.h>
    23 #endif
    2422
    25 #ifdef HAVE_CPLEX
     23#ifdef LEMON_HAVE_CPLEX
    2624#include <lemon/cplex.h>
    2725#endif
    2826
    29 #ifdef HAVE_GLPK
     27#ifdef LEMON_HAVE_GLPK
    3028#include <lemon/glpk.h>
    3129#endif
    3230
    33 #ifdef HAVE_CBC
     31#ifdef LEMON_HAVE_CBC
    3432#include <lemon/cbc.h>
    3533#endif
     
    130128{
    131129
    132 #ifdef HAVE_GLPK
     130#ifdef LEMON_HAVE_GLPK
    133131  {
    134132    GlpkMip mip1;
     
    138136#endif
    139137
    140 #ifdef HAVE_CPLEX
     138#ifdef LEMON_HAVE_CPLEX
    141139  try {
    142140    CplexMip mip2;
     
    148146#endif
    149147
    150 #ifdef HAVE_CBC
     148#ifdef LEMON_HAVE_CBC
    151149  {
    152150    CbcMip mip1;
  • tools/dimacs-solver.cc

    r640 r644  
    201201    .boolOption("int","Use 'int' for capacities, costs etc. (default)")
    202202    .optionGroup("datatype","int")
    203 #ifdef HAVE_LONG_LONG
     203#ifdef LEMON_HAVE_LONG_LONG
    204204    .boolOption("long","Use 'long long' for capacities, costs etc.")
    205205    .optionGroup("datatype","long")
     
    268268  else if(ap.given("ldouble"))
    269269    solve<long double>(ap,is,os,desc);
    270 #ifdef HAVE_LONG_LONG
     270#ifdef LEMON_HAVE_LONG_LONG
    271271  else if(ap.given("long"))
    272272    solve<long long>(ap,is,os,desc);
Note: See TracChangeset for help on using the changeset viewer.