Skip to content

Instantly share code, notes, and snippets.

@cfranzen
Created June 18, 2020 10:31
@echo off
REM Before running this script make sure that cmake and Visual Studio has been installed
REM Download Bison and Flex dependencies and maintain their paths below
REM Download ZLib as source and compile x64 release using contrib/vstudio/*. Copy static linked library to ZLIB_HOME\lib
REM Download MPIR as a replacement for GMP as source an compile x64 binary using msbuild.bat in build.vcXX directory (maybe VS path needs to be changed in msbuild.bat)
SET SCIP_DIR=C:\Tools\solver\scip-7.0.0
SET BISON_HOME=C:\Tools\bison
SET FLEX_HOME=C:\Tools\flex
SET ZLIB_HOME=C:\Tools\zlib
SET MPIR_HOME=C:\Tools\mpir
SET GUROBI_HOME=C:\Tools\solver\gurobi-9.0.2
REM Configure console
SET "PATH=%BISON_HOME%\bin;%FLEX_HOME%\bin;%PATH%"
SET PWD=%~dp0
REM Build SCIP with all its dependencies
cd "%SCIP_DIR%"
if not exist build goto cleanup_scip_done
choice /c YN /T 10 /n /D N /M "Do you really want to remove the SCIP build and release directory? (y/n)"
if errorlevel 2 goto cleanup_scip_done
rd /s /q build
rd /s /q release
:cleanup_scip_done
if not exist build mkdir build
cd build
cmake .. -DCMAKE_GENERATOR_PLATFORM=x64 -DZLIB_LIBRARY=%ZLIB_HOME%\lib\zlibstat.lib -DZLIB_INCLUDE_DIR=%ZLIB_HOME% -DGMP_DIR=%MPIR_HOME%\lib\x64\Release -DBOOST=OFF -DQUADMATH=OFF -DZIMPL=OFF -DGCG=OFF -DPAPILO=OFF -DLPS=grb -DGUROBI_DIR=%GUROBI_HOME%\win64 -DCMAKE_INSTALL_PREFIX=%SCIP_DIR%\release
cmake --build . --config Release --target INSTALL
cd %PWD%
PAUSE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment