diff --git a/resources/3rdparty/CMakeLists.txt b/resources/3rdparty/CMakeLists.txt index a41e5f39c..5c1324bbf 100644 --- a/resources/3rdparty/CMakeLists.txt +++ b/resources/3rdparty/CMakeLists.txt @@ -178,8 +178,8 @@ if (STORM_USE_GUROBI) set(STORM_HAVE_GUROBI ${GUROBI_FOUND}) if (GUROBI_FOUND) message (STATUS "Storm - Linking with Gurobi.") - add_imported_library(Gurobi "" ${GUROBI_LIBRARY} ${GUROBI_INCLUDE_DIRS}) - list(APPEND STORM_DEP_TARGETS Gurobi) + add_imported_library(Gurobi SHARED ${GUROBI_LIBRARY} ${GUROBI_INCLUDE_DIRS}) + list(APPEND STORM_DEP_TARGETS Gurobi_SHARED) endif() else() set(STORM_HAVE_GUROBI OFF) diff --git a/resources/cmake/find_modules/FindGurobi.cmake b/resources/cmake/find_modules/FindGurobi.cmake index 7ae23b115..77595baa8 100644 --- a/resources/cmake/find_modules/FindGurobi.cmake +++ b/resources/cmake/find_modules/FindGurobi.cmake @@ -22,6 +22,9 @@ find_path(GUROBI_INCLUDE_DIR "/Library/gurobi604/mac64/include" "/Library/gurobi605/mac64/include" "/Library/gurobi650/mac64/include" + "/Library/gurobi651/mac64/include" + "/Library/gurobi652/mac64/include" + "/Library/gurobi702/mac64/include" "C:\\libs\\gurobi502\\include" "C:\\gurobi600\\win64\\include" "${GUROBI_ROOT}/include" @@ -38,11 +41,16 @@ find_library( GUROBI_LIBRARY gurobi56 gurobi60 gurobi65 + gurobi70 PATHS "$ENV{GUROBI_HOME}/lib" "/Library/gurobi502/mac64/lib" "/Library/gurobi602/mac64/lib" "/Library/gurobi604/mac64/lib" "/Library/gurobi605/mac64/lib" + "/Library/gurobi650/mac64/lib" + "/Library/gurobi651/mac64/lib" + "/Library/gurobi652/mac64/lib" + "/Library/gurobi702/mac64/lib" "C:\\libs\\gurobi502\\lib" "C:\\gurobi600\\win64\\lib" "${GUROBI_ROOT}/lib" @@ -56,6 +64,9 @@ find_library( GUROBI_CXX_LIBRARY "/Library/gurobi604/mac64/lib" "/Library/gurobi605/mac64/lib" "/Library/gurobi650/mac64/lib" + "/Library/gurobi651/mac64/lib" + "/Library/gurobi652/mac64/lib" + "/Library/gurobi702/mac64/lib" "C:\\libs\\gurobi502\\lib" "C:\\gurobi600\\win64\\lib" "${GUROBI_ROOT}/lib" diff --git a/src/storm/solver/GurobiLpSolver.cpp b/src/storm/solver/GurobiLpSolver.cpp index d624f2cfb..76713be08 100644 --- a/src/storm/solver/GurobiLpSolver.cpp +++ b/src/storm/solver/GurobiLpSolver.cpp @@ -65,7 +65,7 @@ namespace storm { // Enable the following line to only print the output of Gurobi if the debug flag is set. toggleOutput(storm::settings::getModule().isDebugSet() || storm::settings::getModule().isOutputSet()); // Enable the following line to restrict Gurobi to one thread only. - error = GRBsetintparam(env, "Threads", storm::settings::getModule().getNumberOfThreads()); + error = GRBsetintparam(env, "Threads", storm::settings::getModule().getNumberOfThreads()); STORM_LOG_THROW(error == 0, storm::exceptions::InvalidStateException, "Unable to set Gurobi Parameter Threads (" << GRBgeterrormsg(env) << ", error code " << error << ")."); // Enable the following line to force Gurobi to be as precise about the binary variables as required by the given precision option.