-
Notifications
You must be signed in to change notification settings - Fork 563
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Try to Use Ninja to Speed Up Build #666
Changes from all commits
7365e5d
7ba5cca
f87b418
a1f8ac8
970f3ae
d770a1f
709bbae
19407b5
c3ba2c3
242ecbc
99d6b69
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,10 +6,18 @@ rem REQUIRED: path to Boost source directory | |
if not defined BOOST_ROOT set BOOST_ROOT=%RIME_ROOT%\deps\boost_1_78_0 | ||
|
||
rem architecture, Visual Studio version and platform toolset | ||
set ARCH=Win32 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Some of these envars are not set in the else-branch. That's probably not okay because There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @lotem These envars like |
||
set BJAM_TOOLSET=msvc-14.2 | ||
set CMAKE_GENERATOR="Visual Studio 16 2019" | ||
set PLATFORM_TOOLSET=v142 | ||
if not defined CMAKE_GENERATOR ( | ||
set ARCH=Win32 | ||
set BJAM_TOOLSET=msvc-14.2 | ||
set CMAKE_GENERATOR="Visual Studio 16 2019" | ||
set PLATFORM_TOOLSET=v142 | ||
) else ( | ||
set VSVEROPT="-version 16,17" | ||
call "%~dp0env.vswhere.bat" x86 | ||
set VSVEROPT= | ||
set CXX=cl | ||
set CC=cl | ||
) | ||
|
||
rem OPTIONAL: path to additional build tools | ||
rem set DEVTOOLS_PATH=%ProgramFiles%\Git\cmd;%ProgramFiles%\CMake\bin;C:\Python27; |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,10 +6,18 @@ rem REQUIRED: path to Boost source directory | |
if not defined BOOST_ROOT set BOOST_ROOT=%RIME_ROOT%\deps\boost_1_69_0 | ||
|
||
rem 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 | ||
if not defined CMAKE_GENERATOR ( | ||
set ARCH=Win32 | ||
set BJAM_TOOLSET=msvc-14.1 | ||
set CMAKE_GENERATOR="Visual Studio 15 2017" | ||
set PLATFORM_TOOLSET=v141_xp | ||
) else ( | ||
set "VSVEROPT=-version [15.0^,16.0^)" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What does the else-block do? Why is it on the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If |
||
call ./env.vswhere.bat x86 | ||
set VSVEROPT= | ||
set CXX=cl | ||
set CC=cl | ||
) | ||
|
||
rem OPTIONAL: path to additional build tools | ||
rem set DEVTOOLS_PATH=%ProgramFiles%\Git\cmd;%ProgramFiles%\CMake\bin;C:\Python27; |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,10 +6,18 @@ rem REQUIRED: path to Boost source directory | |
if not defined BOOST_ROOT set BOOST_ROOT=%RIME_ROOT%\deps\boost_1_78_0 | ||
|
||
rem 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 | ||
if not defined CMAKE_GENERATOR ( | ||
set ARCH=Win32 | ||
set BJAM_TOOLSET=msvc-14.2 | ||
set CMAKE_GENERATOR="Visual Studio 16 2019" | ||
set PLATFORM_TOOLSET=v142 | ||
) else ( | ||
set "VSVEROPT=-version [16.0^,17.0^)" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How about creating a separate There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @lotem No need actually. Else-block plays the same role with if-block. |
||
call ./env.vswhere.bat x86 | ||
set VSVEROPT= | ||
set CXX=cl | ||
set CC=cl | ||
) | ||
|
||
rem OPTIONAL: path to additional build tools | ||
rem set DEVTOOLS_PATH=%ProgramFiles%\Git\cmd;%ProgramFiles%\CMake\bin;C:\Python27; |
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. What does this script do? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @lotem To find where Visual Studio installed in and set some envars we need. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
@echo off | ||
rem This file is taken from vim project. | ||
rem To be used on MS-Windows for Visual C++ 2017 or later. | ||
rem See INSTALLpc.txt for information. | ||
rem | ||
rem Usage: | ||
rem For x86 builds run this with "x86" option: | ||
rem msvc-latest x86 | ||
rem For x64 builds run this with "x86_amd64" option or "x64" option: | ||
rem msvc-latest x86_amd64 | ||
rem msvc-latest x64 | ||
rem | ||
rem Optional environment variables: | ||
rem VSWHERE: | ||
rem Full path to vswhere.exe. | ||
rem VSVEROPT: | ||
rem Option to search specific version of Visual Studio. | ||
rem Default: -latest | ||
rem To search VS2017: | ||
rem set "VSVEROPT=-version [15.0^,16.0^)" | ||
rem To search VS2019: | ||
rem set "VSVEROPT=-version [16.0^,17.0^)" | ||
rem To search VS2022: | ||
rem set "VSVEROPT=-version [17.0^,18.0^)" | ||
|
||
if "%VSWHERE%"=="" ( | ||
set "VSWHERE=%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe" | ||
set VSWHERE_SET=yes | ||
) | ||
if not exist "%VSWHERE%" ( | ||
echo Error: vswhere not found. | ||
set VSWHERE= | ||
set VSWHERE_SET= | ||
exit /b 1 | ||
) | ||
|
||
if "%VSVEROPT%"=="" ( | ||
set VSVEROPT=-latest | ||
set VSVEROPT_SET=yes | ||
) | ||
|
||
rem Search Visual Studio Community, Professional or above. | ||
for /f "usebackq tokens=*" %%i in (`"%VSWHERE%" %VSVEROPT% -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath`) do ( | ||
set InstallDir=%%i | ||
) | ||
if exist "%InstallDir%\VC\Auxiliary\Build\vcvarsall.bat" ( | ||
call "%InstallDir%\VC\Auxiliary\Build\vcvarsall.bat" %* | ||
goto done | ||
) | ||
|
||
rem Search Visual Studio 2017 Express. | ||
rem (Visual Studio 2017 Express uses different component IDs.) | ||
for /f "usebackq tokens=*" %%i in (`"%VSWHERE%" %VSVEROPT% -products Microsoft.VisualStudio.Product.WDExpress -property installationPath`) do ( | ||
set InstallDir=%%i | ||
) | ||
if exist "%InstallDir%\VC\Auxiliary\Build\vcvarsall.bat" ( | ||
call "%InstallDir%\VC\Auxiliary\Build\vcvarsall.bat" %* | ||
) else ( | ||
echo Error: vcvarsall.bat not found. | ||
rem Set ERRORLEVEL to 1. | ||
call | ||
) | ||
|
||
:done | ||
if "%VSWHERE_SET%"=="yes" ( | ||
set VSWHERE= | ||
set VSWHERE_SET= | ||
) | ||
if "%VSVEROPT_SET%"=="yes" ( | ||
set VSVEROPT= | ||
set VSVEROPT_SET= | ||
) | ||
set InstallDir= |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These lines repeats scripts in
xcode.mk
. CanMakefile
replacexcode.mk
after this change?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@lotem I think the answer is yes. We can merge
Makefile
andxcode.mk
since the latter just specifyCMAKE_GENERATOR
as Xcode and nothing else is different with the former.