Browse Source

Added new versions to FindGurobi.cmake

tempestpy_adaptions
Tim Quatmann 6 years ago
parent
commit
a2190c04b0
  1. 13
      resources/3rdparty/CMakeLists.txt
  2. 10
      resources/cmake/find_modules/FindGurobi.cmake

13
resources/3rdparty/CMakeLists.txt

@ -199,9 +199,16 @@ if (STORM_USE_GUROBI)
find_package(Gurobi QUIET REQUIRED)
set(STORM_HAVE_GUROBI ${GUROBI_FOUND})
if (GUROBI_FOUND)
message (STATUS "Storm - Linking with Gurobi.")
add_imported_library(Gurobi SHARED ${GUROBI_LIBRARY} ${GUROBI_INCLUDE_DIRS})
list(APPEND STORM_DEP_TARGETS Gurobi_SHARED)
if (EXISTS ${GUROBI_LIBRARY})
message (STATUS "Storm - Linking with Gurobi.")
add_imported_library(Gurobi SHARED ${GUROBI_LIBRARY} ${GUROBI_INCLUDE_DIRS})
list(APPEND STORM_DEP_TARGETS Gurobi_SHARED)
else()
# The FindGurobi.cmake script needs to be updated every now and then as the library file contains the version number...
message(SEND_ERROR "Gurobi Library ${GUROBI_LIBRARY} not found. If your Gurobi Version is higher then 8.1.0, please contact the Storm developers.")
endif()
else()
message(SEND_ERROR "Gurobi Library requested but was not found. Make sure that GUROBI_ROOT points to the correct directory (containing include/ and lib/ subdirectories).")
endif()
else()
set(STORM_HAVE_GUROBI OFF)

10
resources/cmake/find_modules/FindGurobi.cmake

@ -25,6 +25,8 @@ find_path(GUROBI_INCLUDE_DIR
"/Library/gurobi651/mac64/include"
"/Library/gurobi652/mac64/include"
"/Library/gurobi702/mac64/include"
"/Library/gurobi801/mac64/include"
"/Library/gurobi810/mac64/include"
"${GUROBI_ROOT}/include"
)
@ -41,7 +43,9 @@ find_library( GUROBI_LIBRARY
gurobi65
gurobi70
gurobi75
PATHS "$ENV{GUROBI_HOME}/lib"
gurobi80
gurobi81
PATHS "$ENV{GUROBI_HOME}/lib"
"/Library/gurobi502/mac64/lib"
"/Library/gurobi602/mac64/lib"
"/Library/gurobi604/mac64/lib"
@ -50,6 +54,8 @@ find_library( GUROBI_LIBRARY
"/Library/gurobi651/mac64/lib"
"/Library/gurobi652/mac64/lib"
"/Library/gurobi702/mac64/lib"
"/Library/gurobi801/mac64/lib"
"/Library/gurobi810/mac64/lib"
"${GUROBI_ROOT}/lib"
)
@ -64,6 +70,8 @@ find_library( GUROBI_CXX_LIBRARY
"/Library/gurobi651/mac64/lib"
"/Library/gurobi652/mac64/lib"
"/Library/gurobi702/mac64/lib"
"/Library/gurobi801/mac64/lib"
"/Library/gurobi810/mac64/lib"
"${GUROBI_ROOT}/lib"
)

Loading…
Cancel
Save