CMakeLists.txt
author Peter Kovacs <kpeter@inf.elte.hu>
Wed, 29 Apr 2009 03:15:24 +0200
changeset 640 6c408d864fa1
parent 620 c3ce597c11ae
child 627 20dac2104519
permissions -rw-r--r--
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.
alpar@225
     1
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
alpar@225
     2
alpar@480
     3
IF(EXISTS ${CMAKE_SOURCE_DIR}/cmake/version.cmake)
alpar@480
     4
  INCLUDE(${CMAKE_SOURCE_DIR}/cmake/version.cmake)
alpar@480
     5
ELSE(EXISTS ${CMAKE_SOURCE_DIR}/cmake/version.cmake)
alpar@480
     6
  SET(PROJECT_NAME "LEMON")
alpar@480
     7
  SET(PROJECT_VERSION "hg-tip" CACHE STRING "LEMON version string.")
alpar@480
     8
ENDIF(EXISTS ${CMAKE_SOURCE_DIR}/cmake/version.cmake)
alpar@225
     9
alpar@225
    10
PROJECT(${PROJECT_NAME})
alpar@225
    11
ladanyi@549
    12
SET(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake)
alpar@225
    13
alpar@225
    14
INCLUDE(FindDoxygen)
alpar@225
    15
INCLUDE(FindGhostscript)
ladanyi@473
    16
FIND_PACKAGE(GLPK 4.33)
ladanyi@620
    17
FIND_PACKAGE(CPLEX)
ladanyi@621
    18
FIND_PACKAGE(COIN)
ladanyi@473
    19
ladanyi@473
    20
ADD_DEFINITIONS(-DHAVE_CONFIG_H)
ladanyi@473
    21
alpar@477
    22
IF(MSVC)
alpar@477
    23
  SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4250 /wd4355 /wd4800 /wd4996")
alpar@477
    24
# Suppressed warnings:
alpar@477
    25
# C4250: 'class1' : inherits 'class2::member' via dominance
alpar@477
    26
# C4355: 'this' : used in base member initializer list
alpar@477
    27
# C4800: 'type' : forcing value to bool 'true' or 'false' (performance warning)
alpar@477
    28
# C4996: 'function': was declared deprecated
alpar@477
    29
ENDIF(MSVC)
alpar@477
    30
alpar@496
    31
INCLUDE(CheckTypeSize)
alpar@496
    32
CHECK_TYPE_SIZE("long long" LONG_LONG)
alpar@496
    33
alpar@225
    34
ENABLE_TESTING()
alpar@225
    35
alpar@225
    36
ADD_SUBDIRECTORY(lemon)
ladanyi@549
    37
IF(${CMAKE_SOURCE_DIR} STREQUAL ${PROJECT_SOURCE_DIR})
ladanyi@549
    38
  ADD_SUBDIRECTORY(demo)
ladanyi@549
    39
  ADD_SUBDIRECTORY(tools)
ladanyi@549
    40
  ADD_SUBDIRECTORY(doc)
ladanyi@549
    41
  ADD_SUBDIRECTORY(test)
ladanyi@549
    42
ENDIF(${CMAKE_SOURCE_DIR} STREQUAL ${PROJECT_SOURCE_DIR})
alpar@225
    43
ladanyi@552
    44
IF(${CMAKE_SOURCE_DIR} STREQUAL ${PROJECT_SOURCE_DIR})
ladanyi@552
    45
  IF(WIN32)
ladanyi@552
    46
    SET(CPACK_PACKAGE_NAME ${PROJECT_NAME})
ladanyi@552
    47
    SET(CPACK_PACKAGE_VENDOR "EGRES")
ladanyi@552
    48
    SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY
ladanyi@552
    49
      "LEMON - Library of Efficient Models and Optimization in Networks")
ladanyi@552
    50
    SET(CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/LICENSE")
alpar@225
    51
ladanyi@552
    52
    SET(CPACK_PACKAGE_VERSION ${PROJECT_VERSION})
alpar@225
    53
ladanyi@552
    54
    SET(CPACK_PACKAGE_INSTALL_DIRECTORY
ladanyi@552
    55
      "${PROJECT_NAME} ${PROJECT_VERSION}")
ladanyi@552
    56
    SET(CPACK_PACKAGE_INSTALL_REGISTRY_KEY
ladanyi@552
    57
      "${PROJECT_NAME} ${PROJECT_VERSION}")
alpar@225
    58
ladanyi@552
    59
    SET(CPACK_COMPONENTS_ALL headers library html_documentation bin)
alpar@225
    60
ladanyi@552
    61
    SET(CPACK_COMPONENT_HEADERS_DISPLAY_NAME "C++ headers")
ladanyi@552
    62
    SET(CPACK_COMPONENT_LIBRARY_DISPLAY_NAME "Dynamic-link library")
ladanyi@552
    63
    SET(CPACK_COMPONENT_BIN_DISPLAY_NAME "Command line utilities")
ladanyi@552
    64
    SET(CPACK_COMPONENT_HTML_DOCUMENTATION_DISPLAY_NAME "HTML documentation")
alpar@225
    65
ladanyi@552
    66
    SET(CPACK_COMPONENT_HEADERS_DESCRIPTION
ladanyi@552
    67
      "C++ header files")
ladanyi@552
    68
    SET(CPACK_COMPONENT_LIBRARY_DESCRIPTION
ladanyi@552
    69
      "DLL and import library")
ladanyi@552
    70
    SET(CPACK_COMPONENT_BIN_DESCRIPTION
ladanyi@552
    71
      "Command line utilities")
ladanyi@552
    72
    SET(CPACK_COMPONENT_HTML_DOCUMENTATION_DESCRIPTION
ladanyi@552
    73
      "Doxygen generated documentation")
alpar@225
    74
ladanyi@552
    75
    SET(CPACK_COMPONENT_HEADERS_DEPENDS library)
alpar@225
    76
ladanyi@552
    77
    SET(CPACK_COMPONENT_HEADERS_GROUP "Development")
ladanyi@552
    78
    SET(CPACK_COMPONENT_LIBRARY_GROUP "Development")
ladanyi@552
    79
    SET(CPACK_COMPONENT_HTML_DOCUMENTATION_GROUP "Documentation")
alpar@225
    80
ladanyi@552
    81
    SET(CPACK_COMPONENT_GROUP_DEVELOPMENT_DESCRIPTION
ladanyi@552
    82
      "Components needed to develop software using LEMON")
ladanyi@552
    83
    SET(CPACK_COMPONENT_GROUP_DOCUMENTATION_DESCRIPTION
ladanyi@552
    84
      "Documentation of LEMON")
alpar@225
    85
ladanyi@552
    86
    SET(CPACK_ALL_INSTALL_TYPES Full Developer)
alpar@225
    87
ladanyi@552
    88
    SET(CPACK_COMPONENT_HEADERS_INSTALL_TYPES Developer Full)
ladanyi@552
    89
    SET(CPACK_COMPONENT_LIBRARY_INSTALL_TYPES Developer Full)
ladanyi@552
    90
    SET(CPACK_COMPONENT_HTML_DOCUMENTATION_INSTALL_TYPES Full)
alpar@225
    91
ladanyi@552
    92
    SET(CPACK_GENERATOR "NSIS")
ladanyi@552
    93
    SET(CPACK_NSIS_MUI_ICON "${PROJECT_SOURCE_DIR}/cmake/nsis/lemon.ico")
ladanyi@552
    94
    SET(CPACK_NSIS_MUI_UNIICON "${PROJECT_SOURCE_DIR}/cmake/nsis/uninstall.ico")
ladanyi@552
    95
    #SET(CPACK_PACKAGE_ICON "${PROJECT_SOURCE_DIR}/cmake/nsis\\\\installer.bmp")
ladanyi@552
    96
    SET(CPACK_NSIS_INSTALLED_ICON_NAME "bin\\\\lemon.ico")
ladanyi@552
    97
    SET(CPACK_NSIS_DISPLAY_NAME "${CPACK_PACKAGE_INSTALL_DIRECTORY} ${PROJECT_NAME}")
ladanyi@552
    98
    SET(CPACK_NSIS_HELP_LINK "http:\\\\\\\\lemon.cs.elte.hu")
ladanyi@552
    99
    SET(CPACK_NSIS_URL_INFO_ABOUT "http:\\\\\\\\lemon.cs.elte.hu")
ladanyi@552
   100
    SET(CPACK_NSIS_CONTACT "lemon-user@lemon.cs.elte.hu")
ladanyi@552
   101
    SET(CPACK_NSIS_CREATE_ICONS_EXTRA "
ladanyi@552
   102
      CreateShortCut \\\"$SMPROGRAMS\\\\$STARTMENU_FOLDER\\\\Documentation.lnk\\\" \\\"$INSTDIR\\\\share\\\\doc\\\\index.html\\\"
ladanyi@552
   103
      ")
ladanyi@552
   104
    SET(CPACK_NSIS_DELETE_ICONS_EXTRA "
ladanyi@552
   105
      !insertmacro MUI_STARTMENU_GETFOLDER Application $MUI_TEMP
ladanyi@552
   106
      Delete \\\"$SMPROGRAMS\\\\$MUI_TEMP\\\\Documentation.lnk\\\"
ladanyi@552
   107
      ")
alpar@225
   108
ladanyi@552
   109
    INCLUDE(CPack)
ladanyi@552
   110
  ENDIF(WIN32)
ladanyi@552
   111
ENDIF(${CMAKE_SOURCE_DIR} STREQUAL ${PROJECT_SOURCE_DIR})