COIN-OR::LEMON - Graph Library

Changeset 1064:fc3854d936f7 in lemon-main for CMakeLists.txt


Ignore:
Timestamp:
05/25/13 06:59:31 (7 years ago)
Author:
Alpar Juttner <alpar@…>
Branch:
default
Phase:
public
Rebase:
35363163616338666530346638653436663533323465616535386135353130313663633232326462
Message:

Enable/disable options for LP/MIP backends (#465)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • CMakeLists.txt

    r1062 r1064  
    6262FIND_PACKAGE(Doxygen)
    6363FIND_PACKAGE(Ghostscript)
    64 FIND_PACKAGE(GLPK 4.33)
    65 FIND_PACKAGE(ILOG)
    66 FIND_PACKAGE(COIN)
     64
     65SET(LEMON_ENABLE_GLPK YES CACHE STRING "Enable GLPK solver backend.")
     66SET(LEMON_ENABLE_ILOG YES CACHE STRING "Enable ILOG (CPLEX) solver backend.")
     67SET(LEMON_ENABLE_COIN YES CACHE STRING "Enable COIN solver backend.")
     68
     69IF(LEMON_ENABLE_GLPK)
     70  FIND_PACKAGE(GLPK 4.33)
     71ENDIF(LEMON_ENABLE_GLPK)
     72IF(LEMON_ENABLE_ILOG)
     73  FIND_PACKAGE(ILOG)
     74ENDIF(LEMON_ENABLE_ILOG)
     75IF(LEMON_ENABLE_COIN)
     76  FIND_PACKAGE(COIN)
     77ENDIF(LEMON_ENABLE_COIN)
     78
     79IF(GLPK_FOUND)
     80  SET(LEMON_HAVE_LP TRUE)
     81  SET(LEMON_HAVE_MIP TRUE)
     82  SET(LEMON_HAVE_GLPK TRUE)
     83ENDIF(GLPK_FOUND)
     84IF(ILOG_FOUND)
     85  SET(LEMON_HAVE_LP TRUE)
     86  SET(LEMON_HAVE_MIP TRUE)
     87  SET(LEMON_HAVE_ILOG TRUE)
     88ENDIF(ILOG_FOUND)
     89IF(COIN_FOUND)
     90  SET(LEMON_HAVE_LP TRUE)
     91  SET(LEMON_HAVE_MIP TRUE)
     92  SET(LEMON_HAVE_CLP TRUE)
     93  SET(LEMON_HAVE_CBC TRUE)
     94ENDIF(COIN_FOUND)
     95
     96IF(ILOG_FOUND)
     97  SET(DEFAULT_LP "CPLEX")
     98  SET(DEFAULT_MIP "CPLEX")
     99ELSEIF(COIN_FOUND)
     100  SET(DEFAULT_LP "CLP")
     101  SET(DEFAULT_MIP "CBC")
     102ELSEIF(GLPK_FOUND)
     103  SET(DEFAULT_LP "GLPK")
     104  SET(DEFAULT_MIP "GLPK")
     105ENDIF()
     106
     107IF(NOT LEMON_DEFAULT_LP OR
     108    (NOT ILOG_FOUND AND (LEMON_DEFAULT_LP STREQUAL "CPLEX")) OR
     109    (NOT COIN_FOUND AND (LEMON_DEFAULT_LP STREQUAL "CLP")) OR
     110    (NOT GLPK_FOUND AND (LEMON_DEFAULT_LP STREQUAL "GLPK")))
     111  SET(LEMON_DEFAULT_LP ${DEFAULT_LP} CACHE STRING
     112    "Default LP solver backend (GLPK, CPLEX or CLP)" FORCE)
     113ENDIF()
     114IF(NOT LEMON_DEFAULT_MIP OR
     115    (NOT ILOG_FOUND AND (LEMON_DEFAULT_MIP STREQUAL "CPLEX")) OR
     116    (NOT COIN_FOUND AND (LEMON_DEFAULT_MIP STREQUAL "CBC")) OR
     117    (NOT GLPK_FOUND AND (LEMON_DEFAULT_MIP STREQUAL "GLPK")))
     118  SET(LEMON_DEFAULT_MIP ${DEFAULT_MIP} CACHE STRING
     119    "Default MIP solver backend (GLPK, CPLEX or CBC)" FORCE)
     120ENDIF()
     121
    67122
    68123IF(DEFINED ENV{LEMON_CXX_WARNING})
Note: See TracChangeset for help on using the changeset viewer.