Skip to content

Commit 9e8d521

Browse files
[macOS] Add Ninja (#11707)
1 parent ff2db66 commit 9e8d521

File tree

6 files changed

+30
-0
lines changed

6 files changed

+30
-0
lines changed

images/macos/scripts/docs-gen/Generate-SoftwareReport.ps1

+1
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ $utilities.AddToolVersion("pkgconf", $(Get-PKGConfVersion))
9797
$utilities.AddToolVersion("Unxip", $(Get-UnxipVersion))
9898
$utilities.AddToolVersion("yq", $(Get-YqVersion))
9999
$utilities.AddToolVersion("zstd", $(Get-ZstdVersion))
100+
$utilities.AddToolVersion("Ninja", $(Get-NinjaVersion))
100101

101102
# Tools
102103
$tools = $installedSoftware.AddHeader("Tools")

images/macos/scripts/docs-gen/SoftwareReport.Common.psm1

+4
Original file line numberDiff line numberDiff line change
@@ -409,3 +409,7 @@ function Get-UnxipVersion {
409409
$unxipVersion = Run-Command "unxip --version" | Take-Part -Part 1
410410
return $unxipVersion
411411
}
412+
413+
function Get-NinjaVersion {
414+
return $(ninja --version)
415+
}

images/macos/scripts/tests/BasicTools.Tests.ps1

+22
Original file line numberDiff line numberDiff line change
@@ -148,3 +148,25 @@ Describe "pkgconf" {
148148
"pkgconf --version" | Should -ReturnZeroExitCode
149149
}
150150
}
151+
152+
Describe "Ninja" {
153+
New-item -Path "/tmp/ninjaproject" -ItemType Directory -Force
154+
Set-Location '/tmp/ninjaproject'
155+
@'
156+
cmake_minimum_required(VERSION 3.10)
157+
project(NinjaTest NONE)
158+
'@ | Out-File -FilePath "./CMakeLists.txt"
159+
160+
It "Make a simple ninja project" {
161+
"cmake -GNinja /tmp/ninjaproject" | Should -ReturnZeroExitCode
162+
}
163+
164+
It "build.ninja file should exist" {
165+
$buildFilePath = Join-Path "/tmp/ninjaproject" "build.ninja"
166+
$buildFilePath | Should -Exist
167+
}
168+
169+
It "Ninja" {
170+
"ninja --version" | Should -ReturnZeroExitCode
171+
}
172+
}

images/macos/toolsets/toolset-13.json

+1
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,7 @@
8181
"swiftformat",
8282
"tcl-tk@8",
8383
"zstd",
84+
"ninja",
8485
"gmp",
8586
"yq",
8687
"xcbeautify",

images/macos/toolsets/toolset-14.json

+1
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@
8484
"swiftformat",
8585
"tcl-tk@8",
8686
"zstd",
87+
"ninja",
8788
"gmp",
8889
"yq",
8990
"unxip",

images/macos/toolsets/toolset-15.json

+1
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@
7777
"pkgconf",
7878
"swiftformat",
7979
"zstd",
80+
"ninja",
8081
"gmp",
8182
"yq",
8283
"unxip",

0 commit comments

Comments
 (0)