cmake: rework gurobi support
This commit is contained in:
committed by
Corentin Le Molgat
parent
3a5008601a
commit
2899beb8f3
@@ -235,6 +235,10 @@ if(USE_GLPK)
|
||||
message(STATUS "Build GLPK: ${BUILD_GLPK}")
|
||||
endif()
|
||||
|
||||
## GUROBI
|
||||
# Since it is dynamicaly loaded upon use, OFF is currently not supported.
|
||||
CMAKE_DEPENDENT_OPTION(USE_GUROBI "Use the Gurobi solver" ON "BUILD_CXX" OFF)
|
||||
|
||||
## HiGHS
|
||||
# see: https://github.com/ERGO-Code/HiGHS
|
||||
CMAKE_DEPENDENT_OPTION(USE_HIGHS "Use the HiGHS solver" OFF "BUILD_CXX" OFF)
|
||||
|
||||
@@ -52,6 +52,9 @@ if(USE_GLPK)
|
||||
list(APPEND OR_TOOLS_COMPILE_DEFINITIONS "USE_GLPK")
|
||||
set(GLPK_DIR glpk)
|
||||
endif()
|
||||
if(USE_GUROBI)
|
||||
set(GUROBI_DIR gurobi)
|
||||
endif()
|
||||
if(USE_HIGHS)
|
||||
list(APPEND OR_TOOLS_COMPILE_DEFINITIONS "USE_HIGHS")
|
||||
endif()
|
||||
@@ -283,7 +286,7 @@ foreach(SUBPROJECT IN ITEMS
|
||||
${GSCIP_DIR}
|
||||
glop
|
||||
graph
|
||||
gurobi
|
||||
${GUROBI_DIR}
|
||||
init
|
||||
linear_solver
|
||||
lp_data
|
||||
|
||||
Reference in New Issue
Block a user