more minor changes to fix compilation issues
This commit is contained in:
+9
-1
@@ -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."
|
||||
|
||||
Reference in New Issue
Block a user