Location: LEMON/LEMON-main/lemon/CMakeLists.txt - annotation

Load file history
gravatar
kpeter (Peter Kovacs)
Support negative costs and bounds in NetworkSimplex (#270) * The interface is reworked to support negative costs and bounds. - ProblemType and problemType() are renamed to SupplyType and supplyType(), see also #234. - ProblemType type is introduced similarly to the LP interface. - 'bool run()' is replaced by 'ProblemType run()' to handle unbounded problem instances, as well. - Add INF public member constant similarly to the LP interface. * Remove capacityMap() and boundMaps(), see also #266. * Update the problem definition in the MCF module. * Remove the usage of Circulation (and adaptors) for checking feasibility. Check feasibility by examining the artifical arcs instead (after solving the problem). * Additional check for unbounded negative cycles found during the algorithm (it is possible now, since negative costs are allowed). * Fix in the constructor (the value types needn't be integer any more), see also #254. * Improve and extend the doc. * Rework the test file and add test cases for negative costs and bounds.
INCLUDE_DIRECTORIES(
  ${PROJECT_SOURCE_DIR}
  ${PROJECT_BINARY_DIR}
)

CONFIGURE_FILE(
  ${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake
  ${CMAKE_CURRENT_BINARY_DIR}/config.h
)

SET(LEMON_SOURCES
  arg_parser.cc
  base.cc
  color.cc
  lp_base.cc
  lp_skeleton.cc
  random.cc
  bits/windows.cc
)

IF(HAVE_GLPK)
  SET(LEMON_SOURCES ${LEMON_SOURCES} glpk.cc)
  INCLUDE_DIRECTORIES(${GLPK_INCLUDE_DIRS})
  IF(WIN32)
    INSTALL(FILES ${GLPK_BIN_DIR}/glpk.dll DESTINATION bin)
    INSTALL(FILES ${GLPK_BIN_DIR}/libltdl3.dll DESTINATION bin)
    INSTALL(FILES ${GLPK_BIN_DIR}/zlib1.dll DESTINATION bin)
  ENDIF(WIN32)
ENDIF(HAVE_GLPK)

IF(HAVE_CPLEX)
  SET(LEMON_SOURCES ${LEMON_SOURCES} cplex.cc)
  INCLUDE_DIRECTORIES(${CPLEX_INCLUDE_DIRS})
ENDIF(HAVE_CPLEX)

IF(HAVE_CLP)
  SET(LEMON_SOURCES ${LEMON_SOURCES} clp.cc)
  INCLUDE_DIRECTORIES(${COIN_INCLUDE_DIRS})
ENDIF(HAVE_CLP)

IF(HAVE_CBC)
  SET(LEMON_SOURCES ${LEMON_SOURCES} cbc.cc)
  INCLUDE_DIRECTORIES(${COIN_INCLUDE_DIRS})
ENDIF(HAVE_CBC)

ADD_LIBRARY(lemon ${LEMON_SOURCES})

INSTALL(
  TARGETS lemon
  ARCHIVE DESTINATION lib
  COMPONENT library)

INSTALL(
  DIRECTORY . bits concepts
  DESTINATION include/lemon
  COMPONENT headers
  FILES_MATCHING PATTERN "*.h")