-
Notifications
You must be signed in to change notification settings - Fork 0
/
settings.bat
76 lines (71 loc) · 3.16 KB
/
settings.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
if "%COMPILER%"=="" SET COMPILER=MSVC2017
if "%PREFIX%"=="" SET PREFIX=d:\libs2017r
if "%BOOST_ROOT%"=="" SET BOOST_ROOT=d:/boost
if "%VARIANT%"=="" SET Variant=Release
set "ER=if ERRORLEVEL 1 exit /b 1"
set "OLDDIR=%CD%"
if "%COMPILER%"=="MINGW" (
SET "PATH=%PATH%;c:\mingw64\bin"
SET "MSYSDIR=c:\msys64\usr\bin"
SET CMAKE_TARGET="MinGW Makefiles"
SET "CFLAGS=-I%PREFIX:\=/%/include"
SET "CPPFLAGS=-I%PREFIX:\=/%/include"
SET "LDFLAGS=-L%PREFIX:\=/%/lib"
SET "CONFARGS=--prefix=%PREFIX:\=/% --host=x86_64-w64-mingw32 --build=x86_64-w64-mingw32"
set "CMAKE=cmake -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=%VARIANT% -DCMAKE_INSTALL_PREFIX=%PREFIX%"
SET "MAKEC=mingw32-make"
SET "SEDC=sed"
SET GENERATOR="MinGW Makefiles"
SET PREFIX1=%PREFIX:\=/%
SET "MSBUILDINSTALL=mingw32-make install"
) else (
if "%COMPILER%"=="MSVC2008-32" (
set MSC_VER=9
set "GENERATOR= -G"Visual Studio 12 2008""
call "%VS90COMNTOOLS%\..\..\VC\vcvarsall.bat" x86
)
if "%COMPILER%"=="MSVC2010-32" (
set MSC_VER=10
set "GENERATOR= -G"Visual Studio 12 2010""
call "%VS100COMNTOOLS%\..\..\VC\vcvarsall.bat" x86
)
if "%COMPILER%"=="MSVC2012" (
set MSC_VER=11
set "GENERATOR= -G"Visual Studio 12 2012 Win64""
call "%VS110COMNTOOLS%\..\..\VC\vcvarsall.bat" x86_amd64
)
if "%COMPILER%"=="MSVC2013" (
set MSC_VER=12
set "GENERATOR= -G"Visual Studio 12 2013 Win64""
call "%VS120COMNTOOLS%\..\..\VC\vcvarsall.bat" x86_amd64
)
if "%COMPILER%"=="MSVC2013-CTP" (
set MSC_VER=12
set "GENERATOR= -G"Visual Studio 12 2013 Win64" -T CTP_Nov2013"
call "%VS120COMNTOOLS%\..\..\VC\vcvarsall.bat" x86_amd64
)
if "%COMPILER%"=="MSVC2015" (
set MSC_VER=14
set "GENERATOR= -G"Visual Studio 14 2015 Win64""
call "%VS140COMNTOOLS%\..\..\VC\vcvarsall.bat" amd64
)
if "%COMPILER%"=="MSVC2017" (
set MSC_VER=15
set "GENERATOR= -G"Visual Studio 15 2017 Win64""
call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" x64
cd /d "%OLDDIR%"
)
set "CMAKE=cmake -G "NMake Makefiles" -DCMAKE_BUILD_TYPE=%VARIANT% -DCMAKE_INSTALL_PREFIX=%PREFIX%"
SET "MAKEC=nmake"
SET PREFIX1=%PREFIX:\=/%
SET "MSBUILDINSTALL=msbuild /p:Configuration=%Variant% /p:BuildInParallel=true /clp:Verbosity=normal /nologo /flp1:logfile=build_errors.txt;errorsonly /flp2:logfile=build_warnings.txt;warningsonly INSTALL.vcxproj"
SET "MSBUILD=msbuild /p:Configuration=%Variant% /p:BuildInParallel=true /clp:Verbosity=normal /nologo /flp1:logfile=build_errors.txt;errorsonly /flp2:logfile=build_warnings.txt;warningsonly"
SET "SEDC=C:\Program Files\Git\usr\bin\sed"
SET "CMAKE_BOOST_FLAGS=-DBOOST_ROOT=%BOOST_ROOT% -DBoost_USE_STATIC_LIBS=ON -DBoost_ADDITIONAL_VERSIONS=1.58;1.59;1.60;1.61;1.62;1.63;1.64;1.65;1.65.1"
)
set "CMAKEVS=cmake %GENERATOR% -DCMAKE_BUILD_TYPE=%VARIANT% -DCMAKE_INSTALL_PREFIX=%PREFIX%"
if NOT EXIST %PREFIX% mkdir %PREFIX%
if NOT EXIST %PREFIX%\include mkdir %PREFIX%\include
if NOT EXIST %PREFIX%\lib mkdir %PREFIX%\lib
if NOT EXIST %PREFIX%\bin mkdir %PREFIX%\bin
echo ============= %COMPILER% -- %VARIANT% --- %PREFIX% --- %CMAKE_TARGET% ==============