Skip to content

Commit

Permalink
build(build.bat): set ARCH=Win32, update default toolset
Browse files Browse the repository at this point in the history
  • Loading branch information
lotem committed Sep 23, 2021
1 parent 62a97cf commit 305e801
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 10 deletions.
12 changes: 9 additions & 3 deletions build.bat
Original file line number Diff line number Diff line change
Expand Up @@ -30,17 +30,21 @@ exit /b 1
echo BOOST_ROOT=%BOOST_ROOT%
echo.

if not defined ARCH (
set ARCH=Win32
)

if not defined BJAM_TOOLSET (
rem the number actually means platform toolset, not %VisualStudioVersion%
set BJAM_TOOLSET=msvc-14.1
set BJAM_TOOLSET=msvc-14.2
)

if not defined CMAKE_GENERATOR (
set CMAKE_GENERATOR="Visual Studio 15 2017"
set CMAKE_GENERATOR="Visual Studio 16 2019"
)

if not defined PLATFORM_TOOLSET (
set PLATFORM_TOOLSET=v141_xp
set PLATFORM_TOOLSET=v142
)

set clean=0
Expand Down Expand Up @@ -162,6 +166,7 @@ if %build_boost% == 1 (
)

set THIRDPARTY_COMMON_CMAKE_FLAGS=-G%CMAKE_GENERATOR%^
-A%ARCH%^
-T%PLATFORM_TOOLSET%^
-DCMAKE_CONFIGURATION_TYPES:STRING="%build_config%"^
-DCMAKE_CXX_FLAGS_RELEASE:STRING="/MT /O2 /Ob2 /DNDEBUG"^
Expand Down Expand Up @@ -241,6 +246,7 @@ if %build_thirdparty% == 1 (
if %build_librime% == 0 goto exit

set RIME_CMAKE_FLAGS=-G%CMAKE_GENERATOR%^
-A%ARCH%^
-T%PLATFORM_TOOLSET%^
-DBUILD_STATIC=ON^
-DBUILD_SHARED_LIBS=%build_shared%^
Expand Down
11 changes: 6 additions & 5 deletions env.bat.template
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@ rem Customize your build environment and save the modified copy to env.bat
set RIME_ROOT=%CD%

rem REQUIRED: path to Boost source directory
set BOOST_ROOT=C:\Libraries\boost_1_69_0
set BOOST_ROOT=C:\Libraries\boost_1_76_0

rem OPTIONAL: Visual Studio version and platform toolset
rem set BJAM_TOOLSET=msvc-14.1
rem set CMAKE_GENERATOR="Visual Studio 15 2017"
rem set PLATFORM_TOOLSET=v141_xp
rem OPTIONAL: architecture, Visual Studio version and platform toolset
rem set ARCH=Win32
rem set BJAM_TOOLSET=msvc-14.2
rem set CMAKE_GENERATOR="Visual Studio 16 2019"
rem set PLATFORM_TOOLSET=v142

rem OPTIONAL: path to additional build tools
rem set DEVTOOLS_PATH=%ProgramFiles%\Git\cmd;%ProgramFiles%\CMake\bin;C:\Python27;
3 changes: 2 additions & 1 deletion env.vs2017_xp.bat
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ set RIME_ROOT=%CD%
rem REQUIRED: path to Boost source directory
set BOOST_ROOT=C:\Libraries\boost_1_69_0

rem OPTIONAL: Visual Studio version and platform toolset
rem OPTIONAL: architecture, Visual Studio version and platform toolset
set ARCH=Win32
set BJAM_TOOLSET=msvc-14.1
set CMAKE_GENERATOR="Visual Studio 15 2017"
set PLATFORM_TOOLSET=v141_xp
Expand Down
3 changes: 2 additions & 1 deletion env.vs2019.bat
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ set RIME_ROOT=%CD%
rem REQUIRED: path to Boost source directory
set BOOST_ROOT=C:\Libraries\boost_1_76_0

rem OPTIONAL: Visual Studio version and platform toolset
rem OPTIONAL: architecture, Visual Studio version and platform toolset
set ARCH=Win32
set BJAM_TOOLSET=msvc-14.2
set CMAKE_GENERATOR="Visual Studio 16 2019"
set PLATFORM_TOOLSET=v142
Expand Down

0 comments on commit 305e801

Please sign in to comment.