Changes in / [643:f3792d5bb294:644:8d289c89d43e] in lemon-main
- Files:
-
- 22 edited
Legend:
- Unmodified
- Added
- Removed
-
CMakeLists.txt
r621 r631 18 18 FIND_PACKAGE(COIN) 19 19 20 ADD_DEFINITIONS(-DHAVE_CONFIG_H)21 22 20 IF(MSVC) 23 21 SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4250 /wd4355 /wd4800 /wd4996") … … 30 28 31 29 INCLUDE(CheckTypeSize) 32 CHECK_TYPE_SIZE("long long" L ONG_LONG)30 CHECK_TYPE_SIZE("long long" LEMON_LONG_LONG) 33 31 34 32 ENABLE_TESTING() -
Makefile.am
r567 r629 12 12 m4/lx_check_glpk.m4 \ 13 13 m4/lx_check_soplex.m4 \ 14 m4/lx_check_clp.m4 \ 15 m4/lx_check_cbc.m4 \ 14 m4/lx_check_coin.m4 \ 16 15 CMakeLists.txt \ 17 16 cmake/FindGhostscript.cmake \ 17 cmake/FindCPLEX.cmake \ 18 18 cmake/FindGLPK.cmake \ 19 cmake/FindCOIN.cmake \ 19 20 cmake/version.cmake.in \ 20 21 cmake/version.cmake \ -
cmake/FindCOIN.cmake
r621 r634 2 2 3 3 FIND_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 ) 6 FIND_LIBRARY(COIN_CBC_LIBRARY 7 NAMES Cbc libCbc 8 HINTS ${COIN_ROOT_DIR}/lib 9 ) 10 FIND_LIBRARY(COIN_CBC_SOLVER_LIBRARY 11 NAMES CbcSolver libCbcSolver 12 HINTS ${COIN_ROOT_DIR}/lib 13 ) 14 FIND_LIBRARY(COIN_CGL_LIBRARY 15 NAMES Cgl libCgl 16 HINTS ${COIN_ROOT_DIR}/lib 17 ) 18 FIND_LIBRARY(COIN_CLP_LIBRARY 19 NAMES Clp libClp 20 HINTS ${COIN_ROOT_DIR}/lib 21 ) 22 FIND_LIBRARY(COIN_COIN_UTILS_LIBRARY 23 NAMES CoinUtils libCoinUtils 24 HINTS ${COIN_ROOT_DIR}/lib 25 ) 26 FIND_LIBRARY(COIN_OSI_LIBRARY 27 NAMES Osi libOsi 28 HINTS ${COIN_ROOT_DIR}/lib 29 ) 30 FIND_LIBRARY(COIN_OSI_CBC_LIBRARY 31 NAMES OsiCbc libOsiCbc 32 HINTS ${COIN_ROOT_DIR}/lib 33 ) 34 FIND_LIBRARY(COIN_OSI_CLP_LIBRARY 35 NAMES OsiClp libOsiClp 36 HINTS ${COIN_ROOT_DIR}/lib 37 ) 38 FIND_LIBRARY(COIN_OSI_VOL_LIBRARY 39 NAMES OsiVol libOsiVol 40 HINTS ${COIN_ROOT_DIR}/lib 41 ) 42 FIND_LIBRARY(COIN_VOL_LIBRARY 43 NAMES Vol libVol 44 HINTS ${COIN_ROOT_DIR}/lib 45 ) 26 46 27 47 INCLUDE(FindPackageHandleStandardArgs) … … 62 82 63 83 IF(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) 68 88 ENDIF(COIN_FOUND) -
cmake/FindCPLEX.cmake
r620 r636 1 SET(CPLEX_ROOT_DIR "" CACHE PATH "CPLEX root directory") 2 1 3 FIND_PATH(CPLEX_INCLUDE_DIR 2 4 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 ) 5 9 FIND_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 ) 8 15 9 16 INCLUDE(FindPackageHandleStandardArgs) … … 12 19 FIND_PATH(CPLEX_BIN_DIR 13 20 cplex91.dll 14 PATHS "C:/ILOG/CPLEX91/bin/x86_win32") 21 PATHS "C:/ILOG/CPLEX91/bin/x86_win32" 22 ) 15 23 16 24 IF(CPLEX_FOUND) 17 25 SET(CPLEX_INCLUDE_DIRS ${CPLEX_INCLUDE_DIR}) 18 26 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") 19 30 ENDIF(CPLEX_FOUND) 20 31 … … 22 33 23 34 IF(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) 27 38 ENDIF(CPLEX_FOUND) -
cmake/FindGLPK.cmake
r619 r638 1 SET(GLPK_ROOT_DIR "" CACHE PATH "GLPK root directory") 2 1 3 SET(GLPK_REGKEY "[HKEY_LOCAL_MACHINE\\SOFTWARE\\GnuWin32\\Glpk;InstallPath]") 2 4 GET_FILENAME_COMPONENT(GLPK_ROOT_PATH ${GLPK_REGKEY} ABSOLUTE) … … 4 6 FIND_PATH(GLPK_INCLUDE_DIR 5 7 glpk.h 6 PATHS ${GLPK_REGKEY}/include) 8 PATHS ${GLPK_REGKEY}/include 9 HINTS ${GLPK_ROOT_DIR}/include 10 ) 11 FIND_LIBRARY(GLPK_LIBRARY 12 glpk 13 PATHS ${GLPK_REGKEY}/lib 14 HINTS ${GLPK_ROOT_DIR}/lib 15 ) 7 16 8 FIND_LIBRARY(GLPK_LIBRARY 9 NAMES glpk 10 PATHS ${GLPK_REGKEY}/lib) 17 IF(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) 44 ENDIF(GLPK_INCLUDE_DIR AND GLPK_LIBRARY) 11 45 12 46 INCLUDE(FindPackageHandleStandardArgs) 13 FIND_PACKAGE_HANDLE_STANDARD_ARGS(GLPK DEFAULT_MSG GLPK_LIBRARY GLPK_INCLUDE_DIR )47 FIND_PACKAGE_HANDLE_STANDARD_ARGS(GLPK DEFAULT_MSG GLPK_LIBRARY GLPK_INCLUDE_DIR GLPK_PROPER_VERSION_FOUND) 14 48 15 49 IF(GLPK_FOUND) … … 22 56 23 57 IF(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) 27 61 ENDIF(GLPK_FOUND) -
configure.ac
r568 r627 26 26 AC_CHECK_TYPE(long long, [long_long_found=yes], [long_long_found=no]) 27 27 if 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.]) 29 29 fi 30 30 -
lemon/CMakeLists.txt
r621 r627 19 19 ) 20 20 21 IF( HAVE_GLPK)21 IF(LEMON_HAVE_GLPK) 22 22 SET(LEMON_SOURCES ${LEMON_SOURCES} glpk.cc) 23 23 INCLUDE_DIRECTORIES(${GLPK_INCLUDE_DIRS}) … … 27 27 INSTALL(FILES ${GLPK_BIN_DIR}/zlib1.dll DESTINATION bin) 28 28 ENDIF(WIN32) 29 ENDIF( HAVE_GLPK)29 ENDIF(LEMON_HAVE_GLPK) 30 30 31 IF( HAVE_CPLEX)31 IF(LEMON_HAVE_CPLEX) 32 32 SET(LEMON_SOURCES ${LEMON_SOURCES} cplex.cc) 33 33 INCLUDE_DIRECTORIES(${CPLEX_INCLUDE_DIRS}) 34 ENDIF( HAVE_CPLEX)34 ENDIF(LEMON_HAVE_CPLEX) 35 35 36 IF( HAVE_CLP)36 IF(LEMON_HAVE_CLP) 37 37 SET(LEMON_SOURCES ${LEMON_SOURCES} clp.cc) 38 38 INCLUDE_DIRECTORIES(${COIN_INCLUDE_DIRS}) 39 ENDIF( HAVE_CLP)39 ENDIF(LEMON_HAVE_CLP) 40 40 41 IF( HAVE_CBC)41 IF(LEMON_HAVE_CBC) 42 42 SET(LEMON_SOURCES ${LEMON_SOURCES} cbc.cc) 43 43 INCLUDE_DIRECTORIES(${COIN_INCLUDE_DIRS}) 44 ENDIF( HAVE_CBC)44 ENDIF(LEMON_HAVE_CBC) 45 45 46 46 ADD_LIBRARY(lemon ${LEMON_SOURCES}) … … 56 56 COMPONENT headers 57 57 FILES_MATCHING PATTERN "*.h") 58 59 INSTALL( 60 FILES ${CMAKE_CURRENT_BINARY_DIR}/config.h 61 DESTINATION include/lemon 62 COMPONENT headers) -
lemon/Makefile.am
r611 r639 16 16 lemon/bits/windows.cc 17 17 18 18 nodist_lemon_HEADERS = lemon/config.h 19 19 20 lemon_libemon_la_CXXFLAGS = \ 20 21 $(AM_CXXFLAGS) \ … … 58 59 lemon/bfs.h \ 59 60 lemon/bin_heap.h \ 61 lemon/cbc.h \ 60 62 lemon/circulation.h \ 61 63 lemon/clp.h \ -
lemon/bits/default_map.h
r617 r627 98 98 99 99 100 #if defined HAVE_LONG_LONG100 #if defined LEMON_HAVE_LONG_LONG 101 101 102 102 // long long -
lemon/config.h.cmake
r621 r627 1 #cmakedefine HAVE_LONG_LONG 12 #cmakedefine HAVE_LP 13 #cmakedefine HAVE_MIP 14 #cmakedefine HAVE_GLPK 15 #cmakedefine HAVE_CPLEX 16 #cmakedefine HAVE_CLP 17 #cmakedefine HAVE_CBC 11 #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 1 1 /* Define to 1 if you have long long */ 2 #undef HAVE_LONG_LONG2 #undef LEMON_HAVE_LONG_LONG 3 3 4 4 /* Define to 1 if you have any LP solver. */ 5 #undef HAVE_LP5 #undef LEMON_HAVE_LP 6 6 7 7 /* Define to 1 if you have any MIP solver. */ 8 #undef HAVE_MIP8 #undef LEMON_HAVE_MIP 9 9 10 10 /* Define to 1 if you have CPLEX. */ 11 #undef HAVE_CPLEX11 #undef LEMON_HAVE_CPLEX 12 12 13 13 /* Define to 1 if you have GLPK. */ 14 #undef HAVE_GLPK14 #undef LEMON_HAVE_GLPK 15 15 16 16 /* Define to 1 if you have SOPLEX */ 17 #undef HAVE_SOPLEX17 #undef LEMON_HAVE_SOPLEX 18 18 19 19 /* Define to 1 if you have CLP */ 20 #undef HAVE_CLP20 #undef LEMON_HAVE_CLP 21 21 22 22 /* Define to 1 if you have CBC */ 23 #undef HAVE_CBC23 #undef LEMON_HAVE_CBC -
lemon/core.h
r617 r639 23 23 #include <algorithm> 24 24 25 #include <lemon/co re.h>25 #include <lemon/config.h> 26 26 #include <lemon/bits/enable_if.h> 27 27 #include <lemon/bits/traits.h> -
lemon/lp.h
r462 r627 23 23 24 24 25 #ifdef HAVE_GLPK25 #ifdef LEMON_HAVE_GLPK 26 26 #include <lemon/glpk.h> 27 #elif HAVE_CPLEX27 #elif LEMON_HAVE_CPLEX 28 28 #include <lemon/cplex.h> 29 #elif HAVE_SOPLEX29 #elif LEMON_HAVE_SOPLEX 30 30 #include <lemon/soplex.h> 31 #elif HAVE_CLP31 #elif LEMON_HAVE_CLP 32 32 #include <lemon/clp.h> 33 33 #endif … … 70 70 typedef GlpkMip Mip; 71 71 #else 72 #ifdef HAVE_GLPK72 #ifdef LEMON_HAVE_GLPK 73 73 # define LEMON_DEFAULT_LP GLPK 74 74 typedef GlpkLp Lp; 75 75 # define LEMON_DEFAULT_MIP GLPK 76 76 typedef GlpkMip Mip; 77 #elif HAVE_CPLEX77 #elif LEMON_HAVE_CPLEX 78 78 # define LEMON_DEFAULT_LP CPLEX 79 79 typedef CplexLp Lp; 80 80 # define LEMON_DEFAULT_MIP CPLEX 81 81 typedef CplexMip Mip; 82 #elif HAVE_SOPLEX82 #elif LEMON_HAVE_SOPLEX 83 83 # define DEFAULT_LP SOPLEX 84 84 typedef SoplexLp Lp; 85 #elif HAVE_CLP85 #elif LEMON_HAVE_CLP 86 86 # define DEFAULT_LP CLP 87 87 typedef ClpLp Lp; -
m4/lx_check_coin.m4
r568 r627 56 56 57 57 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.]) 59 59 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.]) 61 61 AC_MSG_RESULT([yes]) 62 62 else … … 116 116 117 117 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.]) 119 119 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.]) 121 121 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.]) 123 123 AC_MSG_RESULT([yes]) 124 124 else -
m4/lx_check_cplex.m4
r457 r627 62 62 63 63 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.]) 65 65 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.]) 67 67 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.]) 69 69 AC_MSG_RESULT([yes]) 70 70 else -
m4/lx_check_glpk.m4
r459 r627 65 65 66 66 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.]) 68 68 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.]) 70 70 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.]) 72 72 AC_MSG_RESULT([yes]) 73 73 else -
m4/lx_check_soplex.m4
r539 r627 56 56 57 57 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.]) 59 59 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.]) 61 61 AC_MSG_RESULT([yes]) 62 62 else -
scripts/unify-sources.sh
r554 r628 1 1 #!/bin/bash 2 2 3 YEAR=`date + 2003-%Y`3 YEAR=`date +%Y` 4 4 HGROOT=`hg root` 5 6 function hg_year() { 7 if [ -n "$(hg st $1)" ]; then 8 echo $YEAR 9 } 5 10 6 11 # file enumaration modes … … 192 197 * This file is a part of LEMON, a generic C++ optimization library. 193 198 * 194 * Copyright (C) "$YEAR"199 * Copyright (C) 2003-"$(hg_year $1)" 195 200 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 196 201 * (Egervary Research Group on Combinatorial Optimization, EGRES). -
test/CMakeLists.txt
r621 r627 37 37 unionfind_test) 38 38 39 IF( HAVE_LP)39 IF(LEMON_HAVE_LP) 40 40 ADD_EXECUTABLE(lp_test lp_test.cc) 41 41 SET(LP_TEST_LIBS lemon) 42 IF( HAVE_GLPK)42 IF(LEMON_HAVE_GLPK) 43 43 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) 46 46 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) 49 49 SET(LP_TEST_LIBS ${LP_TEST_LIBS} ${COIN_CLP_LIBRARIES}) 50 ENDIF( HAVE_CLP)50 ENDIF(LEMON_HAVE_CLP) 51 51 TARGET_LINK_LIBRARIES(lp_test ${LP_TEST_LIBS}) 52 52 ADD_TEST(lp_test lp_test) 53 53 54 IF(WIN32 AND HAVE_GLPK)54 IF(WIN32 AND LEMON_HAVE_GLPK) 55 55 GET_TARGET_PROPERTY(TARGET_LOC lp_test LOCATION) 56 56 GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH) … … 60 60 COMMAND cmake -E copy ${GLPK_BIN_DIR}/zlib1.dll ${TARGET_PATH} 61 61 ) 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) 64 64 GET_TARGET_PROPERTY(TARGET_LOC lp_test LOCATION) 65 65 GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH) … … 67 67 COMMAND cmake -E copy ${CPLEX_BIN_DIR}/cplex91.dll ${TARGET_PATH} 68 68 ) 69 ENDIF(WIN32 AND HAVE_CPLEX)70 ENDIF( HAVE_LP)69 ENDIF(WIN32 AND LEMON_HAVE_CPLEX) 70 ENDIF(LEMON_HAVE_LP) 71 71 72 IF( HAVE_MIP)72 IF(LEMON_HAVE_MIP) 73 73 ADD_EXECUTABLE(mip_test mip_test.cc) 74 74 SET(MIP_TEST_LIBS lemon) 75 IF( HAVE_GLPK)75 IF(LEMON_HAVE_GLPK) 76 76 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) 79 79 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) 82 82 SET(MIP_TEST_LIBS ${MIP_TEST_LIBS} ${COIN_CBC_LIBRARIES}) 83 ENDIF( HAVE_CBC)83 ENDIF(LEMON_HAVE_CBC) 84 84 TARGET_LINK_LIBRARIES(mip_test ${MIP_TEST_LIBS}) 85 85 ADD_TEST(mip_test mip_test) 86 86 87 IF(WIN32 AND HAVE_GLPK)87 IF(WIN32 AND LEMON_HAVE_GLPK) 88 88 GET_TARGET_PROPERTY(TARGET_LOC mip_test LOCATION) 89 89 GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH) … … 93 93 COMMAND cmake -E copy ${GLPK_BIN_DIR}/zlib1.dll ${TARGET_PATH} 94 94 ) 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) 97 97 GET_TARGET_PROPERTY(TARGET_LOC mip_test LOCATION) 98 98 GET_FILENAME_COMPONENT(TARGET_PATH ${TARGET_LOC} PATH) … … 100 100 COMMAND cmake -E copy ${CPLEX_BIN_DIR}/cplex91.dll ${TARGET_PATH} 101 101 ) 102 ENDIF(WIN32 AND HAVE_CPLEX)103 ENDIF( HAVE_MIP)102 ENDIF(WIN32 AND LEMON_HAVE_CPLEX) 103 ENDIF(LEMON_HAVE_MIP) 104 104 105 105 FOREACH(TEST_NAME ${TESTS}) -
test/lp_test.cc
r575 r631 22 22 #include <lemon/tolerance.h> 23 23 24 #ifdef HAVE_CONFIG_H25 24 #include <lemon/config.h> 26 #endif 27 28 #ifdef HAVE_GLPK 25 26 #ifdef LEMON_HAVE_GLPK 29 27 #include <lemon/glpk.h> 30 28 #endif 31 29 32 #ifdef HAVE_CPLEX30 #ifdef LEMON_HAVE_CPLEX 33 31 #include <lemon/cplex.h> 34 32 #endif 35 33 36 #ifdef HAVE_SOPLEX34 #ifdef LEMON_HAVE_SOPLEX 37 35 #include <lemon/soplex.h> 38 36 #endif 39 37 40 #ifdef HAVE_CLP38 #ifdef LEMON_HAVE_CLP 41 39 #include <lemon/clp.h> 42 40 #endif … … 380 378 lpTest(lp_skel); 381 379 382 #ifdef HAVE_GLPK380 #ifdef LEMON_HAVE_GLPK 383 381 { 384 382 GlpkLp lp_glpk1,lp_glpk2; … … 389 387 #endif 390 388 391 #ifdef HAVE_CPLEX389 #ifdef LEMON_HAVE_CPLEX 392 390 try { 393 391 CplexLp lp_cplex1,lp_cplex2; … … 400 398 #endif 401 399 402 #ifdef HAVE_SOPLEX400 #ifdef LEMON_HAVE_SOPLEX 403 401 { 404 402 SoplexLp lp_soplex1,lp_soplex2; … … 409 407 #endif 410 408 411 #ifdef HAVE_CLP409 #ifdef LEMON_HAVE_CLP 412 410 { 413 411 ClpLp lp_clp1,lp_clp2; -
test/mip_test.cc
r575 r631 19 19 #include "test_tools.h" 20 20 21 #ifdef HAVE_CONFIG_H22 21 #include <lemon/config.h> 23 #endif24 22 25 #ifdef HAVE_CPLEX23 #ifdef LEMON_HAVE_CPLEX 26 24 #include <lemon/cplex.h> 27 25 #endif 28 26 29 #ifdef HAVE_GLPK27 #ifdef LEMON_HAVE_GLPK 30 28 #include <lemon/glpk.h> 31 29 #endif 32 30 33 #ifdef HAVE_CBC31 #ifdef LEMON_HAVE_CBC 34 32 #include <lemon/cbc.h> 35 33 #endif … … 130 128 { 131 129 132 #ifdef HAVE_GLPK130 #ifdef LEMON_HAVE_GLPK 133 131 { 134 132 GlpkMip mip1; … … 138 136 #endif 139 137 140 #ifdef HAVE_CPLEX138 #ifdef LEMON_HAVE_CPLEX 141 139 try { 142 140 CplexMip mip2; … … 148 146 #endif 149 147 150 #ifdef HAVE_CBC148 #ifdef LEMON_HAVE_CBC 151 149 { 152 150 CbcMip mip1; -
tools/dimacs-solver.cc
r640 r644 201 201 .boolOption("int","Use 'int' for capacities, costs etc. (default)") 202 202 .optionGroup("datatype","int") 203 #ifdef HAVE_LONG_LONG203 #ifdef LEMON_HAVE_LONG_LONG 204 204 .boolOption("long","Use 'long long' for capacities, costs etc.") 205 205 .optionGroup("datatype","long") … … 268 268 else if(ap.given("ldouble")) 269 269 solve<long double>(ap,is,os,desc); 270 #ifdef HAVE_LONG_LONG270 #ifdef LEMON_HAVE_LONG_LONG 271 271 else if(ap.given("long")) 272 272 solve<long long>(ap,is,os,desc);
Note: See TracChangeset
for help on using the changeset viewer.