Files
mob/bootstrap.ps1
T

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

32 lines
650 B
PowerShell
Raw Normal View History

param(
[switch]
$Verbose,
[ValidateSet("Debug", "RelWithDebInfo", "Release")]
[string]
$Config = "Release"
)
$root = $PSScriptRoot
if (!$root) {
2023-08-30 15:52:35 +02:00
$root = "."
}
2026-02-07 02:33:40 +08:00
$logLevel = if ($Verbose) { "STATUS" } else { "ERROR" }
2026-02-05 19:32:54 +01:00
cmake --preset vs2026-windows --log-level=$logLevel
2026-02-07 02:33:40 +08:00
if ($Verbose) {
2026-02-05 19:32:54 +01:00
cmake --build --preset vs2026-windows --config $Config --verbose
2026-01-05 20:03:54 +01:00
}
else {
2026-02-05 19:32:54 +01:00
cmake --build --preset vs2026-windows --config $Config
}
2020-05-20 18:28:49 +01:00
if (! $?) {
Write-Error "Build failed"
exit $LastExitCode
}
Copy-Item "$root\build\src\${Config}\mob.exe" "$root\mob.exe"
2023-08-30 15:52:35 +02:00
Write-Output "run ``.\mob -d prefix/path build`` to start building"