]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/tools/build/src/engine/config_toolset.bat
import quincy beta 17.1.0
[ceph.git] / ceph / src / boost / tools / build / src / engine / config_toolset.bat
1 @ECHO OFF
2
3 REM ~ Copyright 2002-2018 Rene Rivera.
4 REM ~ Distributed under the Boost Software License, Version 1.0.
5 REM ~ (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
6
7 :Start
8 REM Setup the toolset command and options.
9 if "_%B2_TOOLSET%_" == "_msvc_" call :Config_MSVC
10 if "_%B2_TOOLSET%_" == "_vc12_" call :Config_VC12
11 if "_%B2_TOOLSET%_" == "_vc14_" call :Config_VC14
12 if "_%B2_TOOLSET%_" == "_vc141_" call :Config_VC141
13 if "_%B2_TOOLSET%_" == "_vc142_" call :Config_VC142
14 if "_%B2_TOOLSET%_" == "_borland_" call :Config_BORLAND
15 if "_%B2_TOOLSET%_" == "_como_" call :Config_COMO
16 if "_%B2_TOOLSET%_" == "_gcc_" call :Config_GCC
17 if "_%B2_TOOLSET%_" == "_gcc-nocygwin_" call :Config_GCC_NOCYGWIN
18 if "_%B2_TOOLSET%_" == "_intel-win32_" call :Config_INTEL_WIN32
19 if "_%B2_TOOLSET%_" == "_mingw_" call :Config_MINGW
20 exit /b %errorlevel%
21
22 :Call_If_Exists
23 ECHO Call_If_Exists %*
24 if EXIST %1 call %*
25 goto :eof
26
27 :Config_MSVC
28 if not defined CXX ( set "CXX=cl" )
29 if NOT "_%MSVCDir%_" == "__" (
30 set "B2_TOOLSET_ROOT=%MSVCDir%\"
31 )
32 call :Call_If_Exists "%B2_TOOLSET_ROOT%bin\VCVARS32.BAT"
33 if not "_%B2_TOOLSET_ROOT%_" == "__" (
34 set "PATH=%B2_TOOLSET_ROOT%bin;%PATH%"
35 )
36 set "B2_CXX=%CXX% /nologo /MP /MT /TP /Feb2 /wd4996 /O2 /GL"
37 set "B2_CXX_LINK=/link kernel32.lib advapi32.lib user32.lib"
38 set "_known_=1"
39 goto :eof
40
41 :Config_VC11
42 if not defined CXX ( set "CXX=cl" )
43 if NOT "_%VS110COMNTOOLS%_" == "__" (
44 set "B2_TOOLSET_ROOT=%VS110COMNTOOLS%..\..\VC\"
45 )
46 if "_%VCINSTALLDIR%_" == "__" call :Call_If_Exists "%B2_TOOLSET_ROOT%VCVARSALL.BAT" %B2_BUILD_ARGS%
47 if NOT "_%B2_TOOLSET_ROOT%_" == "__" (
48 if "_%VCINSTALLDIR%_" == "__" (
49 set "PATH=%B2_TOOLSET_ROOT%bin;%PATH%"
50 ) )
51 set "B2_CXX=%CXX% /nologo /MP /MT /TP /Feb2 /wd4996 /O2 /GL"
52 set "B2_CXX_LINK=/link kernel32.lib advapi32.lib user32.lib"
53 set "_known_=1"
54 goto :eof
55
56 :Config_VC12
57 if not defined CXX ( set "CXX=cl" )
58 if NOT "_%VS120COMNTOOLS%_" == "__" (
59 set "B2_TOOLSET_ROOT=%VS120COMNTOOLS%..\..\VC\"
60 )
61
62 if "_%B2_ARCH%_" == "__" set B2_ARCH=%PROCESSOR_ARCHITECTURE%
63 set B2_BUILD_ARGS=%B2_BUILD_ARGS% %B2_ARCH%
64
65 if "_%VCINSTALLDIR%_" == "__" call :Call_If_Exists "%B2_TOOLSET_ROOT%VCVARSALL.BAT" %B2_BUILD_ARGS%
66 if NOT "_%B2_TOOLSET_ROOT%_" == "__" (
67 if "_%VCINSTALLDIR%_" == "__" (
68 set "PATH=%B2_TOOLSET_ROOT%bin;%PATH%"
69 ) )
70 set "B2_CXX=%CXX% /nologo /MP /MT /TP /Feb2 /wd4996 /O2 /GL"
71 set "B2_CXX_LINK=/link kernel32.lib advapi32.lib user32.lib"
72 set "_known_=1"
73 goto :eof
74
75 :Config_VC14
76 if not defined CXX ( set "CXX=cl" )
77 if "_%B2_TOOLSET_ROOT%_" == "__" (
78 if NOT "_%VS140COMNTOOLS%_" == "__" (
79 set "B2_TOOLSET_ROOT=%VS140COMNTOOLS%..\..\VC\"
80 ))
81
82 if "_%B2_ARCH%_" == "__" set B2_ARCH=%PROCESSOR_ARCHITECTURE%
83 set B2_BUILD_ARGS=%B2_BUILD_ARGS% %B2_ARCH%
84
85 if "_%VCINSTALLDIR%_" == "__" call :Call_If_Exists "%B2_TOOLSET_ROOT%VCVARSALL.BAT" %B2_BUILD_ARGS%
86 if NOT "_%B2_TOOLSET_ROOT%_" == "__" (
87 if "_%VCINSTALLDIR%_" == "__" (
88 set "PATH=%B2_TOOLSET_ROOT%bin;%PATH%"
89 ) )
90 set "B2_CXX=%CXX% /nologo /MP /MT /TP /Feb2 /wd4996 /O2 /GL"
91 set "B2_CXX_LINK=/link kernel32.lib advapi32.lib user32.lib"
92 set "_known_=1"
93 goto :eof
94
95 :Config_VC141
96 if not defined CXX ( set "CXX=cl" )
97 call vswhere_usability_wrapper.cmd
98 REM Reset ERRORLEVEL since from now on it's all based on ENV vars
99 ver > nul 2> nul
100 if "_%B2_TOOLSET_ROOT%_" == "__" (
101 if NOT "_%VS150COMNTOOLS%_" == "__" (
102 set "B2_TOOLSET_ROOT=%VS150COMNTOOLS%..\..\VC\"
103 ))
104
105 if "_%B2_ARCH%_" == "__" set B2_ARCH=%PROCESSOR_ARCHITECTURE%
106 set B2_BUILD_ARGS=%B2_BUILD_ARGS% %B2_ARCH%
107
108 REM return to current directory as vsdevcmd_end.bat switches to %USERPROFILE%\Source if it exists.
109 pushd %CD%
110 if "_%VSINSTALLDIR%_" == "__" call :Call_If_Exists "%B2_TOOLSET_ROOT%Auxiliary\Build\vcvarsall.bat" %B2_BUILD_ARGS%
111 popd
112 set "B2_CXX=%CXX% /nologo /MP /MT /TP /Feb2 /wd4996 /O2 /GL"
113 set "B2_CXX_LINK=/link kernel32.lib advapi32.lib user32.lib"
114 set "_known_=1"
115 goto :eof
116
117 :Config_VC142
118 if not defined CXX ( set "CXX=cl" )
119 call vswhere_usability_wrapper.cmd
120 REM Reset ERRORLEVEL since from now on it's all based on ENV vars
121 ver > nul 2> nul
122 if "_%B2_TOOLSET_ROOT%_" == "__" (
123 if NOT "_%VS160COMNTOOLS%_" == "__" (
124 set "B2_TOOLSET_ROOT=%VS160COMNTOOLS%..\..\VC\"
125 ))
126
127 if "_%B2_ARCH%_" == "__" set B2_ARCH=%PROCESSOR_ARCHITECTURE%
128 set B2_BUILD_ARGS=%B2_BUILD_ARGS% %B2_ARCH%
129
130 REM return to current directory as vsdevcmd_end.bat switches to %USERPROFILE%\Source if it exists.
131 pushd %CD%
132 if "_%VSINSTALLDIR%_" == "__" call :Call_If_Exists "%B2_TOOLSET_ROOT%Auxiliary\Build\vcvarsall.bat" %B2_BUILD_ARGS%
133 popd
134 set "B2_CXX=%CXX% /nologo /MP /MT /TP /Feb2 /wd4996 /O2 /GL"
135 set "B2_CXX_LINK=/link kernel32.lib advapi32.lib user32.lib"
136 set "_known_=1"
137 goto :eof
138
139 :Config_VCUNK
140 if NOT "_%B2_TOOLSET%_" == "_vcunk_" goto Skip_VCUNK
141 call vswhere_usability_wrapper.cmd
142 REM Reset ERRORLEVEL since from now on it's all based on ENV vars
143 ver > nul 2> nul
144 if "_%B2_TOOLSET_ROOT%_" == "__" (
145 if NOT "_%VSUNKCOMNTOOLS%_" == "__" (
146 set "B2_TOOLSET_ROOT=%VSUNKCOMNTOOLS%..\..\VC\"
147 ))
148
149 if "_%B2_ARCH%_" == "__" set B2_ARCH=%PROCESSOR_ARCHITECTURE%
150 set B2_BUILD_ARGS=%B2_BUILD_ARGS% %B2_ARCH%
151
152 REM return to current directory as vsdevcmd_end.bat switches to %USERPROFILE%\Source if it exists.
153 pushd %CD%
154 if "_%VSINSTALLDIR%_" == "__" call :Call_If_Exists "%B2_TOOLSET_ROOT%Auxiliary\Build\vcvarsall.bat" %B2_BUILD_ARGS%
155 popd
156 set "B2_CXX=%CXX% /nologo /MP /MT /TP /Feb2 /wd4996 /O2 /GL"
157 set "B2_CXX_LINK=/link kernel32.lib advapi32.lib user32.lib"
158 set "_known_=1"
159 goto :eof
160
161 :Config_BORLAND
162 if not defined CXX ( set "CXX=bcc32" )
163 if "_%B2_TOOLSET_ROOT%_" == "__" (
164 call guess_toolset.bat test_path bcc32.exe )
165 if "_%B2_TOOLSET_ROOT%_" == "__" (
166 if not errorlevel 1 (
167 set "B2_TOOLSET_ROOT=%FOUND_PATH%..\"
168 ) )
169 if not "_%B2_TOOLSET_ROOT%_" == "__" (
170 set "PATH=%B2_TOOLSET_ROOT%Bin;%PATH%"
171 )
172 set "B2_CXX=%CXX% -tC -P -O2 -w- -I"%B2_TOOLSET_ROOT%Include" -L"%B2_TOOLSET_ROOT%Lib" -Nd -eb2"
173 set "_known_=1"
174 goto :eof
175
176 :Config_COMO
177 if not defined CXX ( set "CXX=como" )
178 set "B2_CXX=%CXX% --inlining -o b2.exe"
179 set "_known_=1"
180 goto :eof
181
182 :Config_GCC
183 if not defined CXX ( set "CXX=g++" )
184 set "B2_CXX=%CXX% -x c++ -std=c++11 -s -O3 -o b2.exe"
185 set "_known_=1"
186 goto :eof
187
188 :Config_GCC_NOCYGWIN
189 if not defined CXX ( set "CXX=g++" )
190 set "B2_CXX=%CXX% -x c++ -std=c++11 -s -O3 -mno-cygwin -o b2.exe"
191 set "_known_=1"
192 goto :eof
193
194 :Config_INTEL_WIN32
195 if not defined CXX ( set "CXX=icl" )
196 set "B2_CXX=%CXX% /nologo /MT /O2 /Ob2 /Gy /GF /GA /GB /Feb2"
197 set "_known_=1"
198 goto :eof
199
200 :Config_MINGW
201 if not defined CXX ( set "CXX=g++" )
202 if not "_%B2_TOOLSET_ROOT%_" == "__" (
203 set "PATH=%B2_TOOLSET_ROOT%bin;%PATH%"
204 )
205 for /F "delims=" %%I in ("%CXX%") do set "PATH=%PATH%;%%~dpI"
206 set "B2_CXX=%CXX% -x c++ -std=c++11 -s -O3 -o b2.exe"
207 set "_known_=1"
208 goto :eof