CMakeLists.txt
changeset 1385 8db773f19586
parent 1234 b208de044477
child 1300 62dba6c90f35
child 1334 ee96cd1cad8a
equal deleted inserted replaced
67:17c962ad52e4 68:86957f8de9ab
    63 FIND_PACKAGE(Ghostscript)
    63 FIND_PACKAGE(Ghostscript)
    64 
    64 
    65 SET(LEMON_ENABLE_GLPK YES CACHE STRING "Enable GLPK solver backend.")
    65 SET(LEMON_ENABLE_GLPK YES CACHE STRING "Enable GLPK solver backend.")
    66 SET(LEMON_ENABLE_ILOG YES CACHE STRING "Enable ILOG (CPLEX) solver backend.")
    66 SET(LEMON_ENABLE_ILOG YES CACHE STRING "Enable ILOG (CPLEX) solver backend.")
    67 SET(LEMON_ENABLE_COIN YES CACHE STRING "Enable COIN solver backend.")
    67 SET(LEMON_ENABLE_COIN YES CACHE STRING "Enable COIN solver backend.")
       
    68 SET(LEMON_ENABLE_SOPLEX YES CACHE STRING "Enable SoPlex solver backend.")
    68 
    69 
    69 IF(LEMON_ENABLE_GLPK) 
    70 IF(LEMON_ENABLE_GLPK) 
    70   FIND_PACKAGE(GLPK 4.33)
    71   FIND_PACKAGE(GLPK 4.33)
    71 ENDIF(LEMON_ENABLE_GLPK)
    72 ENDIF(LEMON_ENABLE_GLPK)
    72 IF(LEMON_ENABLE_ILOG)
    73 IF(LEMON_ENABLE_ILOG)
    73   FIND_PACKAGE(ILOG)
    74   FIND_PACKAGE(ILOG)
    74 ENDIF(LEMON_ENABLE_ILOG)
    75 ENDIF(LEMON_ENABLE_ILOG)
    75 IF(LEMON_ENABLE_COIN)
    76 IF(LEMON_ENABLE_COIN)
    76   FIND_PACKAGE(COIN)
    77   FIND_PACKAGE(COIN)
    77 ENDIF(LEMON_ENABLE_COIN)
    78 ENDIF(LEMON_ENABLE_COIN)
       
    79 IF(LEMON_ENABLE_SOPLEX)
       
    80   FIND_PACKAGE(SOPLEX)
       
    81 ENDIF(LEMON_ENABLE_SOPLEX)
    78 
    82 
    79 IF(GLPK_FOUND)
    83 IF(GLPK_FOUND)
    80   SET(LEMON_HAVE_LP TRUE)
    84   SET(LEMON_HAVE_LP TRUE)
    81   SET(LEMON_HAVE_MIP TRUE)
    85   SET(LEMON_HAVE_MIP TRUE)
    82   SET(LEMON_HAVE_GLPK TRUE)
    86   SET(LEMON_HAVE_GLPK TRUE)
    90   SET(LEMON_HAVE_LP TRUE)
    94   SET(LEMON_HAVE_LP TRUE)
    91   SET(LEMON_HAVE_MIP TRUE)
    95   SET(LEMON_HAVE_MIP TRUE)
    92   SET(LEMON_HAVE_CLP TRUE)
    96   SET(LEMON_HAVE_CLP TRUE)
    93   SET(LEMON_HAVE_CBC TRUE)
    97   SET(LEMON_HAVE_CBC TRUE)
    94 ENDIF(COIN_FOUND)
    98 ENDIF(COIN_FOUND)
       
    99 IF(SOPLEX_FOUND)
       
   100   SET(LEMON_HAVE_LP TRUE)
       
   101   SET(LEMON_HAVE_SOPLEX TRUE)
       
   102 ENDIF(SOPLEX_FOUND)
    95 
   103 
    96 IF(ILOG_FOUND)
   104 IF(ILOG_FOUND)
    97   SET(DEFAULT_LP "CPLEX")
   105   SET(DEFAULT_LP "CPLEX")
    98   SET(DEFAULT_MIP "CPLEX")
   106   SET(DEFAULT_MIP "CPLEX")
    99 ELSEIF(COIN_FOUND)
   107 ELSEIF(COIN_FOUND)
   100   SET(DEFAULT_LP "CLP")
   108   SET(DEFAULT_LP "CLP")
   101   SET(DEFAULT_MIP "CBC")
   109   SET(DEFAULT_MIP "CBC")
   102 ELSEIF(GLPK_FOUND)
   110 ELSEIF(GLPK_FOUND)
   103   SET(DEFAULT_LP "GLPK")
   111   SET(DEFAULT_LP "GLPK")
   104   SET(DEFAULT_MIP "GLPK")
   112   SET(DEFAULT_MIP "GLPK")
       
   113 ELSEIF(SOPLEX_FOUND)
       
   114   SET(DEFAULT_LP "SOPLEX")
   105 ENDIF()
   115 ENDIF()
   106 
   116 
   107 IF(NOT LEMON_DEFAULT_LP OR
   117 IF(NOT LEMON_DEFAULT_LP OR
   108     (NOT ILOG_FOUND AND (LEMON_DEFAULT_LP STREQUAL "CPLEX")) OR
   118     (NOT ILOG_FOUND AND (LEMON_DEFAULT_LP STREQUAL "CPLEX")) OR
   109     (NOT COIN_FOUND AND (LEMON_DEFAULT_LP STREQUAL "CLP")) OR
   119     (NOT COIN_FOUND AND (LEMON_DEFAULT_LP STREQUAL "CLP")) OR
   110     (NOT GLPK_FOUND AND (LEMON_DEFAULT_LP STREQUAL "GLPK")))
   120     (NOT GLPK_FOUND AND (LEMON_DEFAULT_LP STREQUAL "GLPK")) OR
       
   121     (NOT SOPLEX_FOUND AND (LEMON_DEFAULT_LP STREQUAL "SOPLEX")))
   111   SET(LEMON_DEFAULT_LP ${DEFAULT_LP} CACHE STRING
   122   SET(LEMON_DEFAULT_LP ${DEFAULT_LP} CACHE STRING
   112     "Default LP solver backend (GLPK, CPLEX or CLP)" FORCE)
   123     "Default LP solver backend (GLPK, CPLEX, CLP or SOPLEX)" FORCE)
   113 ENDIF()
   124 ENDIF()
   114 IF(NOT LEMON_DEFAULT_MIP OR
   125 IF(NOT LEMON_DEFAULT_MIP OR
   115     (NOT ILOG_FOUND AND (LEMON_DEFAULT_MIP STREQUAL "CPLEX")) OR
   126     (NOT ILOG_FOUND AND (LEMON_DEFAULT_MIP STREQUAL "CPLEX")) OR
   116     (NOT COIN_FOUND AND (LEMON_DEFAULT_MIP STREQUAL "CBC")) OR
   127     (NOT COIN_FOUND AND (LEMON_DEFAULT_MIP STREQUAL "CBC")) OR
   117     (NOT GLPK_FOUND AND (LEMON_DEFAULT_MIP STREQUAL "GLPK")))
   128     (NOT GLPK_FOUND AND (LEMON_DEFAULT_MIP STREQUAL "GLPK")))