[macOS] Add Ninja (#11707)

This commit is contained in:
Alexey-Ayupov
2025-03-04 15:56:00 +01:00
committed by GitHub
parent ff2db66e2d
commit 9e8d521bef
6 changed files with 30 additions and 0 deletions

View File

@@ -97,6 +97,7 @@ $utilities.AddToolVersion("pkgconf", $(Get-PKGConfVersion))
$utilities.AddToolVersion("Unxip", $(Get-UnxipVersion))
$utilities.AddToolVersion("yq", $(Get-YqVersion))
$utilities.AddToolVersion("zstd", $(Get-ZstdVersion))
$utilities.AddToolVersion("Ninja", $(Get-NinjaVersion))
# Tools
$tools = $installedSoftware.AddHeader("Tools")

View File

@@ -409,3 +409,7 @@ function Get-UnxipVersion {
$unxipVersion = Run-Command "unxip --version" | Take-Part -Part 1
return $unxipVersion
}
function Get-NinjaVersion {
return $(ninja --version)
}

View File

@@ -148,3 +148,25 @@ Describe "pkgconf" {
"pkgconf --version" | Should -ReturnZeroExitCode
}
}
Describe "Ninja" {
New-item -Path "/tmp/ninjaproject" -ItemType Directory -Force
Set-Location '/tmp/ninjaproject'
@'
cmake_minimum_required(VERSION 3.10)
project(NinjaTest NONE)
'@ | Out-File -FilePath "./CMakeLists.txt"
It "Make a simple ninja project" {
"cmake -GNinja /tmp/ninjaproject" | Should -ReturnZeroExitCode
}
It "build.ninja file should exist" {
$buildFilePath = Join-Path "/tmp/ninjaproject" "build.ninja"
$buildFilePath | Should -Exist
}
It "Ninja" {
"ninja --version" | Should -ReturnZeroExitCode
}
}

View File

@@ -81,6 +81,7 @@
"swiftformat",
"tcl-tk@8",
"zstd",
"ninja",
"gmp",
"yq",
"xcbeautify",

View File

@@ -84,6 +84,7 @@
"swiftformat",
"tcl-tk@8",
"zstd",
"ninja",
"gmp",
"yq",
"unxip",

View File

@@ -77,6 +77,7 @@
"pkgconf",
"swiftformat",
"zstd",
"ninja",
"gmp",
"yq",
"unxip",