2 ## @brief find Gurobi library given GUROBI_HOME, set GUROBI_VERSION and GUROBI_LINK_LIB
4 ## It checks the version of Gurobi and generate linking flag.
5 ## Use following command in the Makefile to view the results
7 ## $(info Gurobi: GUROBI_VERSION = $(GUROBI_VERSION), GUROBI_LINK_LIB = $(GUROBI_LINK_LIB))
10 ## @date Jan 2017 11:18:47 AM CST
12 ## @param GUROBI_VERSION version of Gurobi
13 ## @param GUROBI_LINK_LIB link to Gurobi
14 ## @param GUROBI_CXX_LINK_LIB link to Gurobi
18 GUROBI_VERSION = $(subst .so,,$(subst libgurobi,,$(notdir $(wildcard $(GUROBI_HOME)/lib/libgurobi??.so))))
19 GUROBI_LINK_LIB = -Wl,-rpath,$(GUROBI_HOME)/lib -L $(GUROBI_HOME)/lib -lgurobi$(GUROBI_VERSION)
20 GUROBI_CXX_LINK_LIB = -Wl,-rpath,$(GUROBI_HOME)/lib -L $(GUROBI_HOME)/lib -lgurobi_c++ -lgurobi$(GUROBI_VERSION)