:: For VS2008 32-bit builds you probably need:
:: https://support.microsoft.com/en-us/help/976656/error-message-when-you-use-the-visual-c-2008-compiler-fatal-error-c185
:: http://thehotfixshare.net/board/index.php?showtopic=14050

echo on

:: Start with bootstrap
call bootstrap.bat vc%vc%

:: if errorlevel 1 exit /b 1

set LogFile=b2.build.log
set TempLog=b2.build.log.tmp
set LogTee=^> %TempLog%^&^& type %TempLog%^&^&type %TempLog%^>^>%LogFile%

:: This doesn't work:
:: https://stackoverflow.com/questions/4714289/boost-libraries-build-only-what-i-need
:: error: both --with-<library> and --without-<library> specified
:: set FASTBUILD=1
:: if !FASTBUILD! == 1 (
:: We must build something: --without-atomic
::  set WITHOUTS=--without-python --with-atomic --without-chrono --without-container --without-context --without-contract --without-coroutine --without-date_time --without-exception --without-fiber --without-filesystem --without-graph --without-graph_parallel --without-iostreams --without-locale --without-log --without-math --without-mpi --without-program_options --without-random --without-regex --without-serialization --without-signals --without-stacktrace --without-system --without-test --without-thread --without-timer --without-type_erasure --without-wave
:: ) else (
::  set WITHOUTS=--without-python
:: )

set WITHOUTS=--without-python

echo .\b2                    ^
  -q -d+2 --debug            ^
  --prefix=%LIBRARY_PREFIX%  ^
  --build-type=minimal       ^
  toolset=msvc-%vc%.0        ^
  address-model=%ARCH%       ^
  variant=release            ^
  threading=multi            ^
  link=static,shared         ^
  --layout=versioned         ^
  -j%CPU_COUNT%              ^
  %WITHOUTS%                 ^
  stage                      ^
  %LogTee%

:: Build step
.\b2                         ^
  -q -d+2 --debug            ^
  --prefix=%LIBRARY_PREFIX%  ^
  --build-type=minimal       ^
  toolset=msvc-%vc%.0        ^
  address-model=%ARCH%       ^
  variant=release            ^
  threading=multi            ^
  link=static,shared         ^
  --layout=versioned         ^
  -j%CPU_COUNT%              ^
  %WITHOUTS%                 ^
  stage                      ^
  %LogTee%

if errorlevel 1 exit /b 1
