more minor changes to fix compilation issues

This commit is contained in:
Lew
2026-10-19 19:26:47 -04:00
parent c46487ac7c
commit 01cd6981ac
3 changed files with 15 additions and 7 deletions
+9 -1
View File
@@ -1,7 +1,7 @@
param(
[ValidateSet("Debug", "Release")]
[string]$Configuration = "Release",
[string]$BuildDirectory = "build"
[string]$BuildDirectory = "build-ninja"
)
$ErrorActionPreference = "Stop"
@@ -31,6 +31,13 @@ if ($LASTEXITCODE -ne 0) {
exit $LASTEXITCODE
}
$compilationDatabase = Join-Path $buildPath "compile_commands.json"
if (-not (Test-Path $compilationDatabase)) {
Write-Error "CMake did not generate compile_commands.json at '$compilationDatabase'."
exit 1
}
Copy-Item -LiteralPath $compilationDatabase -Destination (Join-Path $sourceDirectory "compile_commands.json") -Force
& cmake --build $buildPath --config $Configuration
if ($LASTEXITCODE -ne 0) {
exit $LASTEXITCODE
@@ -38,3 +45,4 @@ if ($LASTEXITCODE -ne 0) {
$outputPath = Join-Path $buildPath "bin\$($Configuration.ToLowerInvariant())\LumberJack.exe"
Write-Host "Build complete: $outputPath"
Write-Host "Updated compile_commands.json for clangd."