This commit is contained in:
Thomas Krijnen
2021-02-17 16:06:50 +01:00
parent 6bcfa5946f
commit 67666ed70e
3 changed files with 18 additions and 9 deletions
+14 -5
View File
@@ -54,10 +54,10 @@ if not "!GEN_SHORTHAND!"=="" if !GEN_SHORTHAND!==!GENERATOR! goto :GeneratorShor
set "VS_PLATFORM=Win32"
:: use the command prompt target platform, at least initially
if %VSCMD_ARG_TGT_ARCH%==x86 set "VS_PLATFORM=Win32"
if %VSCMD_ARG_TGT_ARCH%==x64 set "VS_PLATFORM=x64"
if %VSCMD_ARG_TGT_ARCH%==arm set "VS_PLATFORM=ARM"
if %VSCMD_ARG_TGT_ARCH%==arm64 set "VS_PLATFORM=ARM64"
if "%VSCMD_ARG_TGT_ARCH%"==x86 set "VS_PLATFORM=Win32"
if "%VSCMD_ARG_TGT_ARCH%"==x64 set "VS_PLATFORM=x64"
if "%VSCMD_ARG_TGT_ARCH%"==arm set "VS_PLATFORM=ARM"
if "%VSCMD_ARG_TGT_ARCH%"==arm64 set "VS_PLATFORM=ARM64"
:: "echo if" trick from http://stackoverflow.com/a/8758579
echo(!GEN_SHORTHAND! | findstr /c:"-x86" >nul && ( set "VS_PLATFORM=Win32" )
@@ -160,15 +160,24 @@ IF %VS_VER%==2019 ( set "VC_VER=14.2" )
set BOOST_BOOTSTRAP_VER=vc%VC_VER%
set BOOST_BOOTSTRAP_VER=%BOOST_BOOTSTRAP_VER:.=%
set VS_TOOLSET_HOST=
:: determine the toolset and winapi for Boost b2
:: optionally use 64bit toolset to work around memory errors when linking
IF DEFINED VS_TOOLSET (
set BOOST_TOOLSET=msvc-%BOOST_TOOLSET%
if "!VS_TOOLSET:~-3!"=="_xp" (
set BOOST_WIN_API=define=BOOST_USE_WINAPI_VERSION=0x0501
)
)
IF NOT "%VS_HOST%"=="" (
set VS_TOOLSET_HOST=%VS_TOOLSET%,host=%VS_HOST%
)
) ELSE (
set BOOST_TOOLSET=msvc-%VC_VER%
set BOOST_WIN_API=
IF NOT "%VS_HOST%"=="" (
set VS_TOOLSET_HOST=host=%VS_HOST%
)
)
IF %VS_PLATFORM%==Win32 (