Skip to content

Commit

Permalink
Provisioning: Install Ninja on windows hosts used to build cmake-base…
Browse files Browse the repository at this point in the history
…d QtWebKit

Makefile-based generators of CMake are much less efficient than Ninja. They
generate bloated Makefiles that call back to cmake often. Main offender on
Windows is cmake_depends command which seems to do lots of disk reads.

QtWebKit can now switch to ninja automatically if it's present in PATH.
This should help to reduce build times.

Change-Id: I33d3f4d766a630f8ca4fb64b719fe2e8a5c2e00c
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
  • Loading branch information
annulen authored and tronical committed Jul 3, 2017
1 parent 477736d commit 331cf52
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 0 deletions.
12 changes: 12 additions & 0 deletions coin/provisioning/common/ninja.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
. "$PSScriptRoot\helpers.ps1"

$zip = "c:\users\qt\downloads\ninja-1.6.0-win-x86.zip"

Download https://github.com/ninja-build/ninja/releases/download/v1.6.0/ninja-win.zip \\ci-files01-hki.ci.local\provisioning\ninja\ninja-1.6.0-win-x86.zip $zip
Verify-Checksum $zip "E01093F6533818425F8EFB0843CED7DCAABEA3B2"

Extract-Zip $zip C:\Utils\Ninja
Remove-Item $zip

$machinePath = [Environment]::GetEnvironmentVariable('Path', [EnvironmentVariableTarget]::Machine)
[Environment]::SetEnvironmentVariable("Path", $machinePath + ";C:\Utils\Ninja", [EnvironmentVariableTarget]::Machine)
1 change: 1 addition & 0 deletions coin/provisioning/qtci-windows-10-x86/06-ninja.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
. "$PSScriptRoot\..\common\ninja.ps1"
1 change: 1 addition & 0 deletions coin/provisioning/qtci-windows-10-x86_64/06-ninja.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
. "$PSScriptRoot\..\common\ninja.ps1"
1 change: 1 addition & 0 deletions coin/provisioning/qtci-windows-7-x86/08-ninja.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
. "$PSScriptRoot\..\common\ninja.ps1"

0 comments on commit 331cf52

Please sign in to comment.