From 86d4238f7dc540d4fbaea54c0b578d59de002b9e Mon Sep 17 00:00:00 2001 From: "laurent.perron@gmail.com" Date: Sun, 21 Apr 2013 10:49:57 +0000 Subject: [PATCH] tentative support for scip under windows --- dependencies/solutions/Scip/Scip.sln | 26 ++ dependencies/solutions/Scip/scip/scip.vcxproj | 298 ++++++++++++++++++ .../solutions/Scip/soplex/soplex.vcxproj | 233 ++++++++++++++ makefiles/Makefile.cpp.mk | 3 +- makefiles/Makefile.third_party.unix | 2 +- makefiles/Makefile.third_party.win | 44 ++- makefiles/Makefile.win | 21 +- 7 files changed, 605 insertions(+), 22 deletions(-) create mode 100644 dependencies/solutions/Scip/Scip.sln create mode 100644 dependencies/solutions/Scip/scip/scip.vcxproj create mode 100644 dependencies/solutions/Scip/soplex/soplex.vcxproj diff --git a/dependencies/solutions/Scip/Scip.sln b/dependencies/solutions/Scip/Scip.sln new file mode 100644 index 0000000000..98f06dda82 --- /dev/null +++ b/dependencies/solutions/Scip/Scip.sln @@ -0,0 +1,26 @@ + +Microsoft Visual Studio Solution File, Format Version 11.00 +# Visual Studio 2010 +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "soplex", "soplex\soplex.vcxproj", "{A9320037-E7E5-4819-883D-A4C66AFD1AA5}" +EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "scip", "scip\scip.vcxproj", "{D690AA50-D593-4FC6-9355-B5FEFBF2F787}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Release|Win32 = Release|Win32 + Release|x64 = Release|x64 + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {A9320037-E7E5-4819-883D-A4C66AFD1AA5}.Release|Win32.ActiveCfg = Release|Win32 + {A9320037-E7E5-4819-883D-A4C66AFD1AA5}.Release|Win32.Build.0 = Release|Win32 + {A9320037-E7E5-4819-883D-A4C66AFD1AA5}.Release|x64.ActiveCfg = Release|x64 + {A9320037-E7E5-4819-883D-A4C66AFD1AA5}.Release|x64.Build.0 = Release|x64 + {D690AA50-D593-4FC6-9355-B5FEFBF2F787}.Release|Win32.ActiveCfg = Release|Win32 + {D690AA50-D593-4FC6-9355-B5FEFBF2F787}.Release|Win32.Build.0 = Release|Win32 + {D690AA50-D593-4FC6-9355-B5FEFBF2F787}.Release|x64.ActiveCfg = Release|x64 + {D690AA50-D593-4FC6-9355-B5FEFBF2F787}.Release|x64.Build.0 = Release|x64 + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/dependencies/solutions/Scip/scip/scip.vcxproj b/dependencies/solutions/Scip/scip/scip.vcxproj new file mode 100644 index 0000000000..e2ed9b0490 --- /dev/null +++ b/dependencies/solutions/Scip/scip/scip.vcxproj @@ -0,0 +1,298 @@ + + + + + Release + Win32 + + + Release + x64 + + + + {D690AA50-D593-4FC6-9355-B5FEFBF2F787} + Win32Proj + scip + + + + StaticLibrary + false + true + Unicode + + + StaticLibrary + false + true + Unicode + + + + + + + + + + + + + ..\..\..\install\lib\ + + + ..\..\..\install\lib\ + + + scip + + + scip + + + + Level3 + + + MaxSpeed + true + true + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions);WITH_SCIPDEF;NO_SIGACTION;strtok_r=strtok_s;rand_r=rand_s;NO_NEXTAFTER;NPARASCIP;ROUNDING_MS;_CRT_SECURE_NO_WARNINGS + ..\..\..\install\scipoptsuite-3.0.1\soplex-1.7.1\src;..\..\..\install\include;..\..\..\install\scipoptsuite-3.0.1\scip-3.0.1\src;%(AdditionalIncludeDirectories) + + + Windows + false + true + true + + + + + Level3 + + + MaxSpeed + true + true + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions);WITH_SCIPDEF;NO_SIGACTION;strtok_r=strtok_s;rand_r=rand_s;NO_NEXTAFTER;NPARASCIP;ROUNDING_MS;_CRT_SECURE_NO_WARNINGS + ..\..\..\install\scipoptsuite-3.0.1\soplex-1.7.1\src;..\..\..\install\include;..\..\..\install\scipoptsuite-3.0.1\scip-3.0.1\src;%(AdditionalIncludeDirectories) + + + Windows + false + true + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/dependencies/solutions/Scip/soplex/soplex.vcxproj b/dependencies/solutions/Scip/soplex/soplex.vcxproj new file mode 100644 index 0000000000..ce62bb1270 --- /dev/null +++ b/dependencies/solutions/Scip/soplex/soplex.vcxproj @@ -0,0 +1,233 @@ + + + + + Release + Win32 + + + Release + x64 + + + + {A9320037-E7E5-4819-883D-A4C66AFD1AA5} + Win32Proj + soplex + + + + StaticLibrary + false + true + Unicode + + + StaticLibrary + false + true + Unicode + + + + + + + + + + + + + ..\..\..\install\lib\ + + + ..\..\..\install\lib\ + + + soplex + + + soplex + + + + Level3 + + + MaxSpeed + true + true + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions);WITH_ZLIB + ..\..\..\install\scipoptsuite-3.0.1\soplex-1.7.1\src;..\..\..\install\include;%(AdditionalIncludeDirectories) + + + Windows + false + true + true + + + + + Level3 + + + MaxSpeed + true + true + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions);WITH_ZLIB + ..\..\..\install\scipoptsuite-3.0.1\soplex-1.7.1\src;..\..\..\install\include;%(AdditionalIncludeDirectories) + + + Windows + false + true + true + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/makefiles/Makefile.cpp.mk b/makefiles/Makefile.cpp.mk index faea1b5834..2ba8ffc311 100644 --- a/makefiles/Makefile.cpp.mk +++ b/makefiles/Makefile.cpp.mk @@ -236,7 +236,8 @@ clean_cc: -$(DEL) $(LPBINARIES) -$(DEL) $(GEN_DIR)$Sconstraint_solver$S*.pb.* -$(DEL) $(GEN_DIR)$Slinear_solver$S*.pb.* - -$(DEL) $(OR_ROOT)*.exp + -$(DEL) $(BIN_DIR)$S*.exp + -$(DEL) $(BIN_DIR)$S*.lib clean_compat: -$(DELREC) $(OR_ROOT)constraint_solver diff --git a/makefiles/Makefile.third_party.unix b/makefiles/Makefile.third_party.unix index f3bd674966..8f681e2666 100644 --- a/makefiles/Makefile.third_party.unix +++ b/makefiles/Makefile.third_party.unix @@ -19,7 +19,7 @@ ifeq ($(wildcard dependencies/archives/scipoptsuite-$(SCIP_TAG).tgz),) SCIP_TARGET = SCIP_MAKEFILE = # UNIX_SCIP_DIR support not included. else - SCIP_TARGET = dependencies/install/scipoptsuite-$(SCIP_TAG)/scip-$(SCIP_TAG)/bin/scip + SCIP_TARGET = dependencies/install/scipoptsuite-$(SCIP_TAG)/scip-$(SCIP_TAG)/bin/scip.exe SCIP_MAKEFILE = UNIX_SCIP_DIR = $(OR_ROOT_FULL)/dependencies/install/scipoptsuite-$(SCIP_TAG)/scip-$(SCIP_TAG) ifeq ($(PLATFORM), LINUX) BUILD_SCIP = make ZIMPL=false READLINE=false USRCXXFLAGS=-fPIC CFLAGS=-fPIC diff --git a/makefiles/Makefile.third_party.win b/makefiles/Makefile.third_party.win index aa222f8eb8..1715ed0be0 100644 --- a/makefiles/Makefile.third_party.win +++ b/makefiles/Makefile.third_party.win @@ -11,22 +11,17 @@ SWIG_TAG = 2.0.9 # Build extra dependencies (GLPK, SCIP) from archive only if the archive is present. # The archive should be glpk-4.47.tar.gz GLPK_TAG = 4.49 -# The archive should be ziboptsuite-2.1.0.tgz -SCIP_TAG = 2.1.0 +# The archive should be scipoptsuite-3.0.1.tgz +SCIP_TAG = 3.0.1 +SOPLEX_TAG = 1.7.1 # Detect if scip archive is there. -ifeq ($(wildcard dependencies/archives/ziboptsuite-$(SCIP_TAG).tgz),) +ifeq ($(wildcard dependencies/archives/scipoptsuite-$(SCIP_TAG).tgz),) SCIP_TARGET = SCIP_MAKEFILE = \# WINDOWS_SCIP_DIR support not included. else - SCIP_TARGET = dependencies/install/ziboptsuite-$(SCIP_TAG)/scip-$(SCIP_TAG)/bin/scip - SCIP_MAKEFILE = WINDOWS_SCIP_DIR = $(OR_ROOT_FULL)/dependencies/install/ziboptsuite-2.1.0/scip-2.1.0 - ifeq ($(PLATFORM), LINUX) - BUILD_SCIP = make ZIMPL=false READLINE=false USRCXXFLAGS=-fPIC CFLAGS=-fPIC - endif - ifeq ($(PLATFORM), MACOSX) - BUILD_SCIP = make ZIMPL=false READLINE=false ARCH=x86_64 - endif + SCIP_TARGET = dependencies/install/lib/scip.lib + SCIP_MAKEFILE = WINDOWS_SCIP_DIR = $(OR_ROOT_FULL)\\dependencies\\install\\scipoptsuite-$(SCIP_TAG)\\scip-$(SCIP_TAG) endif # Detect if GLPK archive is there. @@ -51,8 +46,8 @@ build_third_party: \ install_swig \ install_support \ install_coin_cbc \ - install_glpk -# install_scip + install_glpk \ + install_scip download_third_party: \ dependencies/archives/zlib$(ZLIB_ARCHIVE_TAG).zip \ @@ -264,10 +259,24 @@ dependencies\sources\glpk-$(GLPK_TAG)\configure: dependencies\archives\glpk-$(GL cd dependencies\sources && ..\..\tools\gzip -dc ..\archives\glpk-$(GLPK_TAG).tar.gz | ..\..\tools\tar.exe xvmf - # Install scip if needed. -install_scip: $(SCIP_TARGET) +install_scip: $(SCIP_TARGET)/ -dependencies/install/ziboptsuite-$(SCIP_TAG)/scip-$(SCIP_TAG)/bin/scip: dependencies/archives/ziboptsuite-$(SCIP_TAG).tgz - cd dependencies/install && tar.exe xvzmf ../archives/ziboptsuite-$(SCIP_TAG).tgz && cd ziboptsuite-$(SCIP_TAG) && $(BUILD_SCIP) +dependencies/install/scipoptsuite-$(SCIP_TAG)/scip-$(SCIP_TAG)/lib/scip.lib: dependencies/archives/scipoptsuite-$(SCIP_TAG).tgz + cd dependencies\install && ..\..\tools\gzip -dc ..\archives\scipoptsuite-$(SCIP_TAG).tgz | ..\..\tools\tar.exe xvmf - + cd dependencies\install\scipoptsuite-$(SCIP_TAG) && ..\..\..\tools\gzip -dc soplex-$(SOPLEX_TAG).tgz | ..\..\..\tools\tar.exe xvmf - + cd dependencies\install\scipoptsuite-$(SCIP_TAG) && ..\..\..\tools\gzip -dc gcg-$(GCG_TAG).tgz | ..\..\..\tools\tar.exe xvmf - + cd dependencies\install\scipoptsuite-$(SCIP_TAG) && ..\..\..\tools\gzip -dc ug-$(UG_TAG).tgz | ..\..\..\tools\tar.exe xvmf - + cd dependencies\install\scipoptsuite-$(SCIP_TAG) && ..\..\..\tools\gzip -dc scip-$(SCIP_TAG).tgz | ..\..\..\tools\tar.exe xvmf - +ifeq ("$(VisualStudioVersion)", "11.0") + tools\upgrade_to_vs2012.cmd dependencies\\solutions\\Scip\\soplex\\soplex.vcxproj + tools\upgrade_to_vs2012.cmd dependencies\\solutions\\Scip\\scip\\scip.vcxproj +endif + cd dependencies\solution\Scip && msbuild /t:soplex + cd dependencies\solution\Scip && msbuild /t:scip +ifeq ("$(VisualStudioVersion)", "11.0") + svn revert dependencies\\solutions\\Scip\\soplex\\soplex.vcxproj + svn revert dependencies\\solutions\\Scip\\scip\\scip.vcxproj +endif # Clean everything. clean_third_party: @@ -280,7 +289,8 @@ clean_third_party: -$(DELREC) dependencies\sources\pcre* -$(DELREC) dependencies\sources\protobuf* -$(DELREC) dependencies\sources\sparsehash* - -$(DELREC) dependencies\sources\swig* + -$(DELREC) dependencies\install\swig* + -$(DELREC) dependencies\install\scip* -$(DEL) Makefile.local # Create Makefile.local diff --git a/makefiles/Makefile.win b/makefiles/Makefile.win index 11aef1ad4a..14e05b48ff 100644 --- a/makefiles/Makefile.win +++ b/makefiles/Makefile.win @@ -81,6 +81,14 @@ GLPK_SWIG = -DUSE_GLPK DYNAMIC_GLPK_LNK = $(WINDOWS_GLPK_DIR)\\lib\\glpk.lib STATIC_GLPK_LNK = $(WINDOWS_GLPK_DIR)\\lib\\glpk.lib endif +# This is needed to find SCIP include files and libraries. +ifdef WINDOWS_SCIP_DIR + SCIP_LNK_DIR = $(OR_ROOT)dependencies\\install + SCIP_INC = /I$(WINDOWS_SCIP_DIR)\\src -DUSE_SCIP + SCIP_SWIG = $(SCIP_INC) + STATIC_SCIP_LNK = $(SCIP_LNK_DIR)\\lib\\scip.lib $(SCIP_LNK_DIR)\\lib\\soplex.lib + DYNAMIC_SCIP_LNK = $(SCIP_LNK_DIR)\\lib\\scip.lib $(SCIP_LNK_DIR)\\lib\\soplex.lib +endif # This is needed to find SULUM include files and libraries. ifdef WINDOWS_SLM_DIR SLM_INC = /I$(WINDOWS_SLM_DIR)\\header /DUSE_SLM @@ -89,6 +97,13 @@ DYNAMIC_SLM_LNK = $(WINDOWS_SLM_DIR)\\win$(PTRLENGTH)\\bin\\sulum10.lib STATIC_SLM_LNK = $(WINDOWS_SLM_DIR)\\win$(PTRLENGTH)\\bin\\sulum10.lib endif +ifeq ($(UNIX_SCIP_TAG),3.0.0) + SCIP_30 = TRUE +endif +ifeq ($(UNIX_SCIP_TAG),3.0.1) + SCIP_30 = TRUE +endif + SWIG_INC = $(GLPK_SWIG) $(CLP_SWIG) $(CBC_SWIG) $(SCIP_SWIG) $(SLM_SWIG) JAVA_INC=/I"$(WINDOWS_JDK_DIR)\\include" /I"$(WINDOWS_JDK_DIR)\\include\\win32" @@ -97,7 +112,7 @@ JAVA_BIN="$(WINDOWS_JDK_DIR)/bin/java" JAR_BIN="$(WINDOWS_JDK_DIR)/bin/jar" CFLAGS= -nologo $(SYSCFLAGS) $(DEBUG) /I$(INC_DIR) /I$(EX_DIR) /I$(GEN_DIR) $(GFLAGS_INC) $(ZLIB_INC) $(THREAD_INC) $(MINISAT_INC)\ - $(PROTOBUF_INC) $(CBC_INC) $(CLP_INC) $(GLPK_INC) $(SLM_INC) /D__WIN32__ \ + $(PROTOBUF_INC) $(CBC_INC) $(CLP_INC) $(GLPK_INC) $(SCIP_INC) $(SLM_INC) /D__WIN32__ \ $(SPARSEHASH_INC) JNIFLAGS=$(CFLAGS) $(JAVA_INC) DYNAMIC_GFLAGS_LNK = $(WINDOWS_GFLAGS_DIR)\\lib\\libgflags.lib @@ -107,5 +122,5 @@ DYNAMIC_PROTOBUF_LNK = $(PROTOBUF_DIR)\\lib\\libprotobuf.lib STATIC_PROTOBUF_LNK = $(PROTOBUF_DIR)\\lib\\libprotobuf.lib DYNAMIC_LD_FLAGS=$(DYNAMIC_GFLAGS_LNK) $(ZLIB_LNK) $(DYNAMIC_PROTOBUF_LNK) psapi.lib ws2_32.lib STATIC_LD_FLAGS=$(STATIC_GFLAGS_LNK) $(ZLIB_LNK) $(STATIC_PROTOBUF_LNK) psapi.lib ws2_32.lib -DYNAMIC_LD_LP_DEPS=$(DYNAMIC_CBC_LNK) $(DYNAMIC_CLP_LNK) $(DYNAMIC_GLPK_LNK) $(DYNAMIC_SLM_LNK) -STATIC_LD_LP_DEPS=$(STATIC_CBC_LNK) $(STATIC_CLP_LNK) $(STATIC_GLPK_LNK) $(STATIC_SLM_LNK) +DYNAMIC_LD_LP_DEPS=$(DYNAMIC_CBC_LNK) $(DYNAMIC_CLP_LNK) $(DYNAMIC_GLPK_LNK) $(DYNAMIC_SCIP_LNK) $(DYNAMIC_SLM_LNK) +STATIC_LD_LP_DEPS=$(STATIC_CBC_LNK) $(STATIC_CLP_LNK) $(STATIC_GLPK_LNK) $(STATIC_SCIP_LNK) $(STATIC_SLM_LNK)