COIN-OR::LEMON - Graph Library

Changeset 674:20dac2104519 in lemon


Ignore:
Timestamp:
04/28/09 14:51:34 (15 years ago)
Author:
Akos Ladanyi <ladanyi@…>
Branch:
default
Parents:
673:58357e986a08 (diff), 540: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

Files:
31 edited

Legend:

Unmodified
Added
Removed
  • CMakeLists.txt

    r540 r674  
    1010PROJECT(${PROJECT_NAME})
    1111
    12 SET(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
     12SET(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
    1313
    1414INCLUDE(FindDoxygen)
    1515INCLUDE(FindGhostscript)
     16FIND_PACKAGE(GLPK 4.33)
     17FIND_PACKAGE(CPLEX)
     18FIND_PACKAGE(COIN)
     19
     20ADD_DEFINITIONS(-DHAVE_CONFIG_H)
     21
     22IF(MSVC)
     23  SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4250 /wd4355 /wd4800 /wd4996")
     24# Suppressed warnings:
     25# C4250: 'class1' : inherits 'class2::member' via dominance
     26# C4355: 'this' : used in base member initializer list
     27# C4800: 'type' : forcing value to bool 'true' or 'false' (performance warning)
     28# C4996: 'function': was declared deprecated
     29ENDIF(MSVC)
    1630
    1731ADD_DEFINITIONS(-DHAVE_CONFIG_H)
     
    2337
    2438ADD_SUBDIRECTORY(lemon)
    25 ADD_SUBDIRECTORY(demo)
    26 ADD_SUBDIRECTORY(doc)
    27 ADD_SUBDIRECTORY(test)
     39IF(${CMAKE_SOURCE_DIR} STREQUAL ${PROJECT_SOURCE_DIR})
     40  ADD_SUBDIRECTORY(demo)
     41  ADD_SUBDIRECTORY(tools)
     42  ADD_SUBDIRECTORY(doc)
     43  ADD_SUBDIRECTORY(test)
     44ENDIF(${CMAKE_SOURCE_DIR} STREQUAL ${PROJECT_SOURCE_DIR})
    2845
    29 IF(WIN32)
    30   SET(CPACK_PACKAGE_NAME ${PROJECT_NAME})
    31   SET(CPACK_PACKAGE_VENDOR "EGRES")
    32   SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY
    33     "LEMON - Library of Efficient Models and Optimization in Networks")
    34   SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_SOURCE_DIR}/LICENSE")
     46IF(${CMAKE_SOURCE_DIR} STREQUAL ${PROJECT_SOURCE_DIR})
     47  IF(WIN32)
     48    SET(CPACK_PACKAGE_NAME ${PROJECT_NAME})
     49    SET(CPACK_PACKAGE_VENDOR "EGRES")
     50    SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY
     51      "LEMON - Library of Efficient Models and Optimization in Networks")
     52    SET(CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/LICENSE")
    3553
    36   SET(CPACK_PACKAGE_VERSION ${PROJECT_VERSION})
     54    SET(CPACK_PACKAGE_VERSION ${PROJECT_VERSION})
    3755
    38   SET(CPACK_PACKAGE_INSTALL_DIRECTORY
    39     "${PROJECT_NAME} ${PROJECT_VERSION}")
    40   SET(CPACK_PACKAGE_INSTALL_REGISTRY_KEY
    41     "${PROJECT_NAME} ${PROJECT_VERSION}")
     56    SET(CPACK_PACKAGE_INSTALL_DIRECTORY
     57      "${PROJECT_NAME} ${PROJECT_VERSION}")
     58    SET(CPACK_PACKAGE_INSTALL_REGISTRY_KEY
     59      "${PROJECT_NAME} ${PROJECT_VERSION}")
    4260
    43   SET(CPACK_COMPONENTS_ALL headers library html_documentation)
     61    SET(CPACK_COMPONENTS_ALL headers library html_documentation bin)
    4462
    45   SET(CPACK_COMPONENT_HEADERS_DISPLAY_NAME "C++ headers")
    46   SET(CPACK_COMPONENT_LIBRARY_DISPLAY_NAME "Dynamic-link library")
    47   SET(CPACK_COMPONENT_HTML_DOCUMENTATION_DISPLAY_NAME "HTML documentation")
     63    SET(CPACK_COMPONENT_HEADERS_DISPLAY_NAME "C++ headers")
     64    SET(CPACK_COMPONENT_LIBRARY_DISPLAY_NAME "Dynamic-link library")
     65    SET(CPACK_COMPONENT_BIN_DISPLAY_NAME "Command line utilities")
     66    SET(CPACK_COMPONENT_HTML_DOCUMENTATION_DISPLAY_NAME "HTML documentation")
    4867
    49   SET(CPACK_COMPONENT_HEADERS_DESCRIPTION
    50     "C++ header files")
    51   SET(CPACK_COMPONENT_LIBRARY_DESCRIPTION
    52     "DLL and import library")
    53   SET(CPACK_COMPONENT_HTML_DOCUMENTATION_DESCRIPTION
    54     "Doxygen generated documentation")
     68    SET(CPACK_COMPONENT_HEADERS_DESCRIPTION
     69      "C++ header files")
     70    SET(CPACK_COMPONENT_LIBRARY_DESCRIPTION
     71      "DLL and import library")
     72    SET(CPACK_COMPONENT_BIN_DESCRIPTION
     73      "Command line utilities")
     74    SET(CPACK_COMPONENT_HTML_DOCUMENTATION_DESCRIPTION
     75      "Doxygen generated documentation")
    5576
    56   SET(CPACK_COMPONENT_HEADERS_DEPENDS library)
     77    SET(CPACK_COMPONENT_HEADERS_DEPENDS library)
    5778
    58   SET(CPACK_COMPONENT_HEADERS_GROUP "Development")
    59   SET(CPACK_COMPONENT_LIBRARY_GROUP "Development")
    60   SET(CPACK_COMPONENT_HTML_DOCUMENTATION_GROUP "Documentation")
     79    SET(CPACK_COMPONENT_HEADERS_GROUP "Development")
     80    SET(CPACK_COMPONENT_LIBRARY_GROUP "Development")
     81    SET(CPACK_COMPONENT_HTML_DOCUMENTATION_GROUP "Documentation")
    6182
    62   SET(CPACK_COMPONENT_GROUP_DEVELOPMENT_DESCRIPTION
    63     "Components needed to develop software using LEMON")
    64   SET(CPACK_COMPONENT_GROUP_DOCUMENTATION_DESCRIPTION
    65     "Documentation of LEMON")
     83    SET(CPACK_COMPONENT_GROUP_DEVELOPMENT_DESCRIPTION
     84      "Components needed to develop software using LEMON")
     85    SET(CPACK_COMPONENT_GROUP_DOCUMENTATION_DESCRIPTION
     86      "Documentation of LEMON")
    6687
    67   SET(CPACK_ALL_INSTALL_TYPES Full Developer)
     88    SET(CPACK_ALL_INSTALL_TYPES Full Developer)
    6889
    69   SET(CPACK_COMPONENT_HEADERS_INSTALL_TYPES Developer Full)
    70   SET(CPACK_COMPONENT_LIBRARY_INSTALL_TYPES Developer Full)
    71   SET(CPACK_COMPONENT_HTML_DOCUMENTATION_INSTALL_TYPES Full)
     90    SET(CPACK_COMPONENT_HEADERS_INSTALL_TYPES Developer Full)
     91    SET(CPACK_COMPONENT_LIBRARY_INSTALL_TYPES Developer Full)
     92    SET(CPACK_COMPONENT_HTML_DOCUMENTATION_INSTALL_TYPES Full)
    7293
    73   SET(CPACK_GENERATOR "NSIS")
    74   SET(CPACK_NSIS_MUI_ICON "${CMAKE_SOURCE_DIR}/cmake/nsis/lemon.ico")
    75   SET(CPACK_NSIS_MUI_UNIICON "${CMAKE_SOURCE_DIR}/cmake/nsis/uninstall.ico")
    76   #SET(CPACK_PACKAGE_ICON "${CMAKE_SOURCE_DIR}/cmake/nsis\\\\installer.bmp")
    77   SET(CPACK_NSIS_INSTALLED_ICON_NAME "bin\\\\lemon.ico")
    78   SET(CPACK_NSIS_DISPLAY_NAME "${CPACK_PACKAGE_INSTALL_DIRECTORY} ${PROJECT_NAME}")
    79   SET(CPACK_NSIS_HELP_LINK "http:\\\\\\\\lemon.cs.elte.hu")
    80   SET(CPACK_NSIS_URL_INFO_ABOUT "http:\\\\\\\\lemon.cs.elte.hu")
    81   SET(CPACK_NSIS_CONTACT "lemon-user@lemon.cs.elte.hu")
    82   SET(CPACK_NSIS_CREATE_ICONS_EXTRA "
    83     CreateShortCut \\\"$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\\Documentation.lnk\\\" \\\"$INSTDIR\\\\share\\\\doc\\\\index.html\\\"
    84     ")
    85   SET(CPACK_NSIS_DELETE_ICONS_EXTRA "
    86     !insertmacro MUI_STARTMENU_GETFOLDER Application $MUI_TEMP
    87     Delete \\\"$SMPROGRAMS\\\\$MUI_TEMP\\\\Documentation.lnk\\\"
    88     ")
     94    SET(CPACK_GENERATOR "NSIS")
     95    SET(CPACK_NSIS_MUI_ICON "${PROJECT_SOURCE_DIR}/cmake/nsis/lemon.ico")
     96    SET(CPACK_NSIS_MUI_UNIICON "${PROJECT_SOURCE_DIR}/cmake/nsis/uninstall.ico")
     97    #SET(CPACK_PACKAGE_ICON "${PROJECT_SOURCE_DIR}/cmake/nsis\\\\installer.bmp")
     98    SET(CPACK_NSIS_INSTALLED_ICON_NAME "bin\\\\lemon.ico")
     99    SET(CPACK_NSIS_DISPLAY_NAME "${CPACK_PACKAGE_INSTALL_DIRECTORY} ${PROJECT_NAME}")
     100    SET(CPACK_NSIS_HELP_LINK "http:\\\\\\\\lemon.cs.elte.hu")
     101    SET(CPACK_NSIS_URL_INFO_ABOUT "http:\\\\\\\\lemon.cs.elte.hu")
     102    SET(CPACK_NSIS_CONTACT "lemon-user@lemon.cs.elte.hu")
     103    SET(CPACK_NSIS_CREATE_ICONS_EXTRA "
     104      CreateShortCut \\\"$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\\Documentation.lnk\\\" \\\"$INSTDIR\\\\share\\\\doc\\\\index.html\\\"
     105      ")
     106    SET(CPACK_NSIS_DELETE_ICONS_EXTRA "
     107      !insertmacro MUI_STARTMENU_GETFOLDER Application $MUI_TEMP
     108      Delete \\\"$SMPROGRAMS\\\\$MUI_TEMP\\\\Documentation.lnk\\\"
     109      ")
    89110
    90   INCLUDE(CPack)
    91 ENDIF(WIN32)
     111    INCLUDE(CPack)
     112  ENDIF(WIN32)
     113ENDIF(${CMAKE_SOURCE_DIR} STREQUAL ${PROJECT_SOURCE_DIR})
  • CMakeLists.txt

    r668 r674  
    2929ENDIF(MSVC)
    3030
     31ADD_DEFINITIONS(-DHAVE_CONFIG_H)
     32
    3133INCLUDE(CheckTypeSize)
    32 CHECK_TYPE_SIZE("long long" LONG_LONG)
     34CHECK_TYPE_SIZE("long long" LEMON_LONG_LONG)
    3335
    3436ENABLE_TESTING()
  • cmake/FindCOIN.cmake

    r668 r674  
    6262
    6363IF(COIN_FOUND)
    64   SET(HAVE_LP TRUE)
    65   SET(HAVE_MIP TRUE)
    66   SET(HAVE_CLP TRUE)
    67   SET(HAVE_CBC TRUE)
     64  SET(LEMON_HAVE_LP TRUE)
     65  SET(LEMON_HAVE_MIP TRUE)
     66  SET(LEMON_HAVE_CLP TRUE)
     67  SET(LEMON_HAVE_CBC TRUE)
    6868ENDIF(COIN_FOUND)
  • cmake/FindCPLEX.cmake

    r667 r674  
    2222
    2323IF(CPLEX_FOUND)
    24   SET(HAVE_LP TRUE)
    25   SET(HAVE_MIP TRUE)
    26   SET(HAVE_CPLEX TRUE)
     24  SET(LEMON_HAVE_LP TRUE)
     25  SET(LEMON_HAVE_MIP TRUE)
     26  SET(LEMON_HAVE_CPLEX TRUE)
    2727ENDIF(CPLEX_FOUND)
  • cmake/FindGLPK.cmake

    r666 r674  
    2222
    2323IF(GLPK_FOUND)
    24   SET(HAVE_LP TRUE)
    25   SET(HAVE_MIP TRUE)
    26   SET(HAVE_GLPK TRUE)
     24  SET(LEMON_HAVE_LP TRUE)
     25  SET(LEMON_HAVE_MIP TRUE)
     26  SET(LEMON_HAVE_GLPK TRUE)
    2727ENDIF(GLPK_FOUND)
  • configure.ac

    r540 r674  
    1919AC_CONFIG_SRCDIR([lemon/list_graph.h])
    2020AC_CONFIG_HEADERS([config.h lemon/config.h])
    21 
    22 lx_cmdline_cxxflags_set=${CXXFLAGS+set}
    2321
    2422dnl Do compilation tests using the C++ compiler.
     
    5351
    5452dnl Set custom compiler flags when using g++.
    55 if test x"$lx_cmdline_cxxflags_set" != x"set" -a "$GXX" = yes -a "$ICC" = no; then
    56   CXXFLAGS="$CXXFLAGS -Wall -W -Wall -W -Wunused -Wformat=2 -Wctor-dtor-privacy -Wnon-virtual-dtor -Wno-char-subscripts -Wwrite-strings -Wno-char-subscripts -Wreturn-type -Wcast-qual -Wcast-align -Wsign-promo -Woverloaded-virtual -Woverloaded-virtual -ansi -fno-strict-aliasing -Wold-style-cast -Wno-unknown-pragmas"
     53if test "$GXX" = yes -a "$ICC" = no; then
     54  WARNINGCXXFLAGS="-Wall -W -Wall -W -Wunused -Wformat=2 -Wctor-dtor-privacy -Wnon-virtual-dtor -Wno-char-subscripts -Wwrite-strings -Wno-char-subscripts -Wreturn-type -Wcast-qual -Wcast-align -Wsign-promo -Woverloaded-virtual -ansi -fno-strict-aliasing -Wold-style-cast -Wno-unknown-pragmas"
    5755fi
     56AC_SUBST([WARNINGCXXFLAGS])
    5857
    5958dnl Checks for libraries.
    60 #LX_CHECK_GLPK
    61 #LX_CHECK_CPLEX
    62 #LX_CHECK_SOPLEX
     59LX_CHECK_GLPK
     60LX_CHECK_CPLEX
     61LX_CHECK_SOPLEX
     62LX_CHECK_COIN
    6363
    64 dnl Disable/enable building the demo programs.
    65 AC_ARG_ENABLE([demo],
    66 AS_HELP_STRING([--enable-demo], [build the demo programs])
    67 AS_HELP_STRING([--disable-demo], [do not build the demo programs @<:@default@:>@]),
    68               [], [enable_demo=no])
    69 AC_MSG_CHECKING([whether to build the demo programs])
    70 if test x"$enable_demo" != x"no"; then
    71   AC_MSG_RESULT([yes])
    72 else
    73   AC_MSG_RESULT([no])
    74 fi
    75 AM_CONDITIONAL([WANT_DEMO], [test x"$enable_demo" != x"no"])
     64AM_CONDITIONAL([HAVE_LP], [test x"$lx_lp_found" = x"yes"])
     65AM_CONDITIONAL([HAVE_MIP], [test x"$lx_mip_found" = x"yes"])
    7666
    7767dnl Disable/enable building the binary tools.
     
    10898AC_CONFIG_FILES([
    10999Makefile
     100demo/Makefile
    110101cmake/version.cmake
    111102doc/Doxyfile
     
    121112echo
    122113echo C++ compiler.................. : $CXX
    123 echo C++ compiles flags............ : $CXXFLAGS
     114echo C++ compiles flags............ : $WARNINGCXXFLAGS $CXXFLAGS
    124115echo
    125116echo Compiler supports long long... : $long_long_found
    126117echo
    127 #echo GLPK support.................. : $lx_glpk_found
    128 #echo CPLEX support................. : $lx_cplex_found
    129 #echo SOPLEX support................ : $lx_soplex_found
    130 #echo
    131 echo Build demo programs........... : $enable_demo
     118echo GLPK support.................. : $lx_glpk_found
     119echo CPLEX support................. : $lx_cplex_found
     120echo SOPLEX support................ : $lx_soplex_found
     121echo CLP support................... : $lx_clp_found
     122echo CBC support................... : $lx_cbc_found
     123echo
    132124echo Build additional tools........ : $enable_tools
    133125echo
  • configure.ac

    r615 r674  
    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
  • demo/CMakeLists.txt

    r539 r674  
    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(DEMOS
  • lemon/CMakeLists.txt

    r539 r674  
    11INCLUDE_DIRECTORIES(
    2   ${CMAKE_SOURCE_DIR}
     2  ${PROJECT_SOURCE_DIR}
    33  ${PROJECT_BINARY_DIR}
    44)
     
    99)
    1010
    11 ADD_LIBRARY(lemon
     11SET(LEMON_SOURCES
    1212  arg_parser.cc
    1313  base.cc
    1414  color.cc
     15  lp_base.cc
     16  lp_skeleton.cc
    1517  random.cc
    1618  bits/windows.cc
    1719)
     20
     21IF(LEMON_HAVE_GLPK)
     22  SET(LEMON_SOURCES ${LEMON_SOURCES} glpk.cc)
     23  INCLUDE_DIRECTORIES(${GLPK_INCLUDE_DIRS})
     24  IF(WIN32)
     25    INSTALL(FILES ${GLPK_BIN_DIR}/glpk.dll DESTINATION bin)
     26    INSTALL(FILES ${GLPK_BIN_DIR}/libltdl3.dll DESTINATION bin)
     27    INSTALL(FILES ${GLPK_BIN_DIR}/zlib1.dll DESTINATION bin)
     28  ENDIF(WIN32)
     29ENDIF(LEMON_HAVE_GLPK)
     30
     31IF(LEMON_HAVE_CPLEX)
     32  SET(LEMON_SOURCES ${LEMON_SOURCES} cplex.cc)
     33  INCLUDE_DIRECTORIES(${CPLEX_INCLUDE_DIRS})
     34ENDIF(LEMON_HAVE_CPLEX)
     35
     36IF(LEMON_HAVE_CLP)
     37  SET(LEMON_SOURCES ${LEMON_SOURCES} clp.cc)
     38  INCLUDE_DIRECTORIES(${COIN_INCLUDE_DIRS})
     39ENDIF(LEMON_HAVE_CLP)
     40
     41IF(LEMON_HAVE_CBC)
     42  SET(LEMON_SOURCES ${LEMON_SOURCES} cbc.cc)
     43  INCLUDE_DIRECTORIES(${COIN_INCLUDE_DIRS})
     44ENDIF(LEMON_HAVE_CBC)
     45
     46ADD_LIBRARY(lemon ${LEMON_SOURCES})
    1847
    1948INSTALL(
  • lemon/CMakeLists.txt

    r668 r674  
    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

    r539 r674  
    88
    99lemon_libemon_la_SOURCES = \
    10         lemon/arg_parser.cc \
    11         lemon/base.cc \
    12         lemon/color.cc \
    13         lemon/random.cc \
     10        lemon/arg_parser.cc \
     11        lemon/base.cc \
     12        lemon/color.cc \
     13        lemon/lp_base.cc \
     14        lemon/lp_skeleton.cc \
     15        lemon/random.cc \
    1416        lemon/bits/windows.cc
    1517
    16 #lemon_libemon_la_CXXFLAGS = $(GLPK_CFLAGS) $(CPLEX_CFLAGS) $(SOPLEX_CXXFLAGS)
    17 #lemon_libemon_la_LDFLAGS = $(GLPK_LIBS) $(CPLEX_LIBS) $(SOPLEX_LIBS)
     18
     19lemon_libemon_la_CXXFLAGS = \
     20        $(AM_CXXFLAGS) \
     21        $(GLPK_CFLAGS) \
     22        $(CPLEX_CFLAGS) \
     23        $(SOPLEX_CXXFLAGS) \
     24        $(CLP_CXXFLAGS) \
     25        $(CBC_CXXFLAGS)
     26
     27lemon_libemon_la_LDFLAGS = \
     28        $(GLPK_LIBS) \
     29        $(CPLEX_LIBS) \
     30        $(SOPLEX_LIBS) \
     31        $(CLP_LIBS) \
     32        $(CBC_LIBS)
     33
     34if HAVE_GLPK
     35lemon_libemon_la_SOURCES += lemon/glpk.cc
     36endif
     37
     38if HAVE_CPLEX
     39lemon_libemon_la_SOURCES += lemon/cplex.cc
     40endif
     41
     42if HAVE_SOPLEX
     43lemon_libemon_la_SOURCES += lemon/soplex.cc
     44endif
     45
     46if HAVE_CLP
     47lemon_libemon_la_SOURCES += lemon/clp.cc
     48endif
     49
     50if HAVE_CBC
     51lemon_libemon_la_SOURCES += lemon/cbc.cc
     52endif
    1853
    1954lemon_HEADERS += \
    20         lemon/arg_parser.h \
     55        lemon/adaptors.h \
     56        lemon/arg_parser.h \
    2157        lemon/assert.h \
    22         lemon/bfs.h \
    23         lemon/bin_heap.h \
    24         lemon/color.h \
     58        lemon/bfs.h \
     59        lemon/bin_heap.h \
     60        lemon/circulation.h \
     61        lemon/clp.h \
     62        lemon/color.h \
    2563        lemon/concept_check.h \
    2664        lemon/config.h \
    27         lemon/counter.h \
     65        lemon/connectivity.h \
     66        lemon/counter.h \
    2867        lemon/core.h \
    29         lemon/dfs.h \
    30         lemon/dijkstra.h \
    31         lemon/dim2.h \
     68        lemon/cplex.h \
     69        lemon/dfs.h \
     70        lemon/dijkstra.h \
     71        lemon/dim2.h \
     72        lemon/dimacs.h \
     73        lemon/edge_set.h \
     74        lemon/elevator.h \
    3275        lemon/error.h \
    33         lemon/graph_to_eps.h \
     76        lemon/euler.h \
     77        lemon/full_graph.h \
     78        lemon/glpk.h \
     79        lemon/gomory_hu.h \
     80        lemon/graph_to_eps.h \
     81        lemon/grid_graph.h \
     82        lemon/hypercube_graph.h \
    3483        lemon/kruskal.h \
     84        lemon/hao_orlin.h \
    3585        lemon/lgf_reader.h \
    3686        lemon/lgf_writer.h \
    3787        lemon/list_graph.h \
     88        lemon/lp.h \
     89        lemon/lp_base.h \
     90        lemon/lp_skeleton.h \
     91        lemon/list_graph.h \
    3892        lemon/maps.h \
     93        lemon/matching.h \
    3994        lemon/math.h \
     95        lemon/min_cost_arborescence.h \
     96        lemon/nauty_reader.h \
     97        lemon/network_simplex.h \
    4098        lemon/path.h \
    41         lemon/random.h \
     99        lemon/preflow.h \
     100        lemon/radix_sort.h \
     101        lemon/random.h \
    42102        lemon/smart_graph.h \
    43         lemon/time_measure.h \
    44         lemon/tolerance.h \
     103        lemon/soplex.h \
     104        lemon/suurballe.h \
     105        lemon/time_measure.h \
     106        lemon/tolerance.h \
    45107        lemon/unionfind.h \
    46108        lemon/bits/windows.h
     
    50112        lemon/bits/array_map.h \
    51113        lemon/bits/base_extender.h \
    52         lemon/bits/bezier.h \
     114        lemon/bits/bezier.h \
    53115        lemon/bits/default_map.h \
    54         lemon/bits/enable_if.h \
     116        lemon/bits/edge_set_extender.h \
     117        lemon/bits/enable_if.h \
     118        lemon/bits/graph_adaptor_extender.h \
    55119        lemon/bits/graph_extender.h \
    56120        lemon/bits/map_extender.h \
    57121        lemon/bits/path_dump.h \
     122        lemon/bits/solver_bits.h \
    58123        lemon/bits/traits.h \
     124        lemon/bits/variant.h \
    59125        lemon/bits/vector_map.h
    60126
  • lemon/Makefile.am

    r658 r674  
    6262        lemon/color.h \
    6363        lemon/concept_check.h \
     64        lemon/config.h \
    6465        lemon/connectivity.h \
    6566        lemon/counter.h \
  • lemon/bits/default_map.h

    r540 r674  
    33 * This file is a part of LEMON, a generic C++ optimization library.
    44 *
    5  * Copyright (C) 2003-2008
     5 * Copyright (C) 2003-2009
    66 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
    77 * (Egervary Research Group on Combinatorial Optimization, EGRES).
     
    154154  class DefaultMap
    155155    : public DefaultMapSelector<_Graph, _Item, _Value>::Map {
     156    typedef typename DefaultMapSelector<_Graph, _Item, _Value>::Map Parent;
     157
    156158  public:
    157     typedef typename DefaultMapSelector<_Graph, _Item, _Value>::Map Parent;
    158159    typedef DefaultMap<_Graph, _Item, _Value> Map;
    159 
    160     typedef typename Parent::Graph Graph;
     160   
     161    typedef typename Parent::GraphType GraphType;
    161162    typedef typename Parent::Value Value;
    162163
    163     explicit DefaultMap(const Graph& graph) : Parent(graph) {}
    164     DefaultMap(const Graph& graph, const Value& value)
     164    explicit DefaultMap(const GraphType& graph) : Parent(graph) {}
     165    DefaultMap(const GraphType& graph, const Value& value)
    165166      : Parent(graph, value) {}
    166167
  • lemon/bits/default_map.h

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

    r540 r674  
    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.cmake

    r668 r674  
    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

    r540 r674  
     1/* Define to 1 if you have long long */
     2#undef LEMON_HAVE_LONG_LONG
     3
     4/* Define to 1 if you have any LP solver. */
     5#undef LEMON_HAVE_LP
     6
     7/* Define to 1 if you have any MIP solver. */
     8#undef LEMON_HAVE_MIP
     9
    110/* Define to 1 if you have CPLEX. */
    211#undef LEMON_HAVE_CPLEX
     
    514#undef LEMON_HAVE_GLPK
    615
    7 /* Define to 1 if you have long long */
    8 #undef LEMON_HAVE_LONG_LONG
     16/* Define to 1 if you have SOPLEX */
     17#undef LEMON_HAVE_SOPLEX
     18
     19/* Define to 1 if you have CLP */
     20#undef LEMON_HAVE_CLP
     21
     22/* Define to 1 if you have CBC */
     23#undef LEMON_HAVE_CBC
  • lemon/config.h.in

    r614 r674  
    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/lp.h

    r485 r674  
    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

    r615 r674  
    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

    r540 r674  
    6363    if test x"$lx_cplex_found" = x"yes"; then
    6464      AC_DEFINE([LEMON_HAVE_CPLEX], [1], [Define to 1 if you have CPLEX.])
     65      lx_lp_found=yes
     66      AC_DEFINE([LEMON_HAVE_LP], [1], [Define to 1 if you have any LP solver.])
     67      lx_mip_found=yes
     68      AC_DEFINE([LEMON_HAVE_MIP], [1], [Define to 1 if you have any MIP solver.])
    6569      AC_MSG_RESULT([yes])
    6670    else
  • m4/lx_check_cplex.m4

    r480 r674  
    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

    r540 r674  
    4343      }
    4444
     45      #if (GLP_MAJOR_VERSION < 4) \
     46         || (GLP_MAJOR_VERSION == 4 && GLP_MINOR_VERSION < 33)
     47      #error Supported GLPK versions: 4.33 or above
     48      #endif
     49
    4550      int main(int argc, char** argv)
    4651      {
     
    6166    if test x"$lx_glpk_found" = x"yes"; then
    6267      AC_DEFINE([LEMON_HAVE_GLPK], [1], [Define to 1 if you have GLPK.])
     68      lx_lp_found=yes
     69      AC_DEFINE([LEMON_HAVE_LP], [1], [Define to 1 if you have any LP solver.])
     70      lx_mip_found=yes
     71      AC_DEFINE([LEMON_HAVE_MIP], [1], [Define to 1 if you have any MIP solver.])
    6372      AC_MSG_RESULT([yes])
    6473    else
  • m4/lx_check_glpk.m4

    r482 r674  
    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

    r540 r674  
    2121      SOPLEX_CXXFLAGS="-I$with_soplex_includedir"
    2222    elif test x"$with_soplex" != x"yes"; then
    23       SOPLEX_CXXFLAGS="-I$with_soplex/include"
     23      SOPLEX_CXXFLAGS="-I$with_soplex/src"
    2424    fi
    2525
     
    3939
    4040    lx_soplex_test_prog='
    41       #include <soplex/soplex.h>
     41      #include <soplex.h>
    4242
    4343      int main(int argc, char** argv)
     
    5757    if test x"$lx_soplex_found" = x"yes"; then
    5858      AC_DEFINE([LEMON_HAVE_SOPLEX], [1], [Define to 1 if you have SOPLEX.])
     59      lx_lp_found=yes
     60      AC_DEFINE([LEMON_HAVE_LP], [1], [Define to 1 if you have any LP solver.])
    5961      AC_MSG_RESULT([yes])
    6062    else
  • m4/lx_check_soplex.m4

    r586 r674  
    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
  • test/CMakeLists.txt

    r539 r674  
    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

    r668 r674  
    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

    r622 r674  
    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

    r622 r674  
    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;
  • tools/dimacs-solver.cc

    r661 r674  
    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.