cmake/FindCOIN.cmake
author Peter Kovacs <kpeter@inf.elte.hu>
Wed, 29 Apr 2009 16:54:27 +0200
changeset 642 111698359429
child 627 20dac2104519
permissions -rw-r--r--
Less map copying in NetworkSimplex (#234)

- The graph is copied in the constructor instead of the init() function.
It must not be modified after the class is constructed.
- The maps are copied once (instead of twice).
- Remove FlowMap, PotentialMap typedefs and flowMap(), pontentialMap()
setter functions.
- flowMap() and potentialMap() query functions copy the values into the
given map (reference) instead of returning a const reference to a
previously constructed map.
ladanyi@621
     1
SET(COIN_ROOT_DIR "" CACHE PATH "COIN root directory")
ladanyi@621
     2
ladanyi@621
     3
FIND_PATH(COIN_INCLUDE_DIR coin/CoinUtilsConfig.h
ladanyi@621
     4
  PATHS ${COIN_ROOT_DIR}/include)
ladanyi@621
     5
ladanyi@621
     6
FIND_LIBRARY(COIN_CBC_LIBRARY libCbc
ladanyi@621
     7
  PATHS ${COIN_ROOT_DIR}/lib)
ladanyi@621
     8
FIND_LIBRARY(COIN_CBC_SOLVER_LIBRARY libCbcSolver
ladanyi@621
     9
  PATHS ${COIN_ROOT_DIR}/lib)
ladanyi@621
    10
FIND_LIBRARY(COIN_CGL_LIBRARY libCgl
ladanyi@621
    11
  PATHS ${COIN_ROOT_DIR}/lib)
ladanyi@621
    12
FIND_LIBRARY(COIN_CLP_LIBRARY libClp
ladanyi@621
    13
  PATHS ${COIN_ROOT_DIR}/lib)
ladanyi@621
    14
FIND_LIBRARY(COIN_COIN_UTILS_LIBRARY libCoinUtils
ladanyi@621
    15
  PATHS ${COIN_ROOT_DIR}/lib)
ladanyi@621
    16
FIND_LIBRARY(COIN_OSI_LIBRARY libOsi
ladanyi@621
    17
  PATHS ${COIN_ROOT_DIR}/lib)
ladanyi@621
    18
FIND_LIBRARY(COIN_OSI_CBC_LIBRARY libOsiCbc
ladanyi@621
    19
  PATHS ${COIN_ROOT_DIR}/lib)
ladanyi@621
    20
FIND_LIBRARY(COIN_OSI_CLP_LIBRARY libOsiClp
ladanyi@621
    21
  PATHS ${COIN_ROOT_DIR}/lib)
ladanyi@621
    22
FIND_LIBRARY(COIN_OSI_VOL_LIBRARY libOsiVol
ladanyi@621
    23
  PATHS ${COIN_ROOT_DIR}/lib)
ladanyi@621
    24
FIND_LIBRARY(COIN_VOL_LIBRARY libVol
ladanyi@621
    25
  PATHS ${COIN_ROOT_DIR}/lib)
ladanyi@621
    26
ladanyi@621
    27
INCLUDE(FindPackageHandleStandardArgs)
ladanyi@621
    28
FIND_PACKAGE_HANDLE_STANDARD_ARGS(COIN DEFAULT_MSG
ladanyi@621
    29
  COIN_INCLUDE_DIR
ladanyi@621
    30
  COIN_CBC_LIBRARY
ladanyi@621
    31
  COIN_CBC_SOLVER_LIBRARY
ladanyi@621
    32
  COIN_CGL_LIBRARY
ladanyi@621
    33
  COIN_CLP_LIBRARY
ladanyi@621
    34
  COIN_COIN_UTILS_LIBRARY
ladanyi@621
    35
  COIN_OSI_LIBRARY
ladanyi@621
    36
  COIN_OSI_CBC_LIBRARY
ladanyi@621
    37
  COIN_OSI_CLP_LIBRARY
ladanyi@621
    38
  COIN_OSI_VOL_LIBRARY
ladanyi@621
    39
  COIN_VOL_LIBRARY
ladanyi@621
    40
)
ladanyi@621
    41
ladanyi@621
    42
IF(COIN_FOUND)
ladanyi@621
    43
  SET(COIN_INCLUDE_DIRS ${COIN_INCLUDE_DIR})
ladanyi@621
    44
  SET(COIN_LIBRARIES "${COIN_CBC_LIBRARY};${COIN_CBC_SOLVER_LIBRARY};${COIN_CGL_LIBRARY};${COIN_CLP_LIBRARY};${COIN_COIN_UTILS_LIBRARY};${COIN_OSI_LIBRARY};${COIN_OSI_CBC_LIBRARY};${COIN_OSI_CLP_LIBRARY};${COIN_OSI_VOL_LIBRARY};${COIN_VOL_LIBRARY}")
ladanyi@621
    45
  SET(COIN_CLP_LIBRARIES "${COIN_CLP_LIBRARY};${COIN_COIN_UTILS_LIBRARY}")
ladanyi@621
    46
  SET(COIN_CBC_LIBRARIES ${COIN_LIBRARIES})
ladanyi@621
    47
ENDIF(COIN_FOUND)
ladanyi@621
    48
ladanyi@621
    49
MARK_AS_ADVANCED(
ladanyi@621
    50
  COIN_INCLUDE_DIR
ladanyi@621
    51
  COIN_CBC_LIBRARY
ladanyi@621
    52
  COIN_CBC_SOLVER_LIBRARY
ladanyi@621
    53
  COIN_CGL_LIBRARY
ladanyi@621
    54
  COIN_CLP_LIBRARY
ladanyi@621
    55
  COIN_COIN_UTILS_LIBRARY
ladanyi@621
    56
  COIN_OSI_LIBRARY
ladanyi@621
    57
  COIN_OSI_CBC_LIBRARY
ladanyi@621
    58
  COIN_OSI_CLP_LIBRARY
ladanyi@621
    59
  COIN_OSI_VOL_LIBRARY
ladanyi@621
    60
  COIN_VOL_LIBRARY
ladanyi@621
    61
)
ladanyi@621
    62
ladanyi@621
    63
IF(COIN_FOUND)
ladanyi@621
    64
  SET(HAVE_LP TRUE)
ladanyi@621
    65
  SET(HAVE_MIP TRUE)
ladanyi@621
    66
  SET(HAVE_CLP TRUE)
ladanyi@621
    67
  SET(HAVE_CBC TRUE)
ladanyi@621
    68
ENDIF(COIN_FOUND)