CMake: Reduce excess quoting
cmake/cmake-builder.ps1 added quotes to arguments that contained spaces, so that arguments printed correctly for progress output. This introduced excess quotes that caused CMake (and likely other MS apps) confusion or argument misinterpretation. Instead of CMake seeing a single "Visual Studio 17 2022", CMake was actually seeing "\"Visual Studio 17 2022\"". This patch only adds the additional quotes when reporting progress or emitting debug output. Otherwise, command line arguments are passed unmolested.
This commit is contained in:
parent
a58849613b
commit
c47e933a60
1 changed files with 5 additions and 5 deletions
|
@ -495,14 +495,14 @@ foreach ($phase in $scriptPhases) {
|
||||||
Write-Host "** ${scriptName}: Configuring and generating"
|
Write-Host "** ${scriptName}: Configuring and generating"
|
||||||
|
|
||||||
$phaseCommand = ${cmakeCmd}
|
$phaseCommand = ${cmakeCmd}
|
||||||
$argList = Quote-Args $generateArgs
|
$argList = $generateArgs
|
||||||
}
|
}
|
||||||
|
|
||||||
"build" {
|
"build" {
|
||||||
Write-Host "** ${scriptName}: Building simulators."
|
Write-Host "** ${scriptName}: Building simulators."
|
||||||
|
|
||||||
$phaseCommand = ${cmakeCmd}
|
$phaseCommand = ${cmakeCmd}
|
||||||
$argList = $(Quote-Args $buildArgs) + $(Quote-Args $buildSpecificArgs)
|
$argList = $buildArgs + $buildSpecificArgs
|
||||||
}
|
}
|
||||||
|
|
||||||
"test" {
|
"test" {
|
||||||
|
@ -529,7 +529,7 @@ foreach ($phase in $scriptPhases) {
|
||||||
}
|
}
|
||||||
|
|
||||||
$phaseCommand = ${ctestCmd}
|
$phaseCommand = ${ctestCmd}
|
||||||
$argList = Quote-Args $testArgs
|
$argList = $testArgs
|
||||||
|
|
||||||
$env:PATH = $modPath
|
$env:PATH = $modPath
|
||||||
|
|
||||||
|
@ -556,13 +556,13 @@ foreach ($phase in $scriptPhases) {
|
||||||
}
|
}
|
||||||
|
|
||||||
$phaseCommand = ${cmakeCmd}
|
$phaseCommand = ${cmakeCmd}
|
||||||
$argList = Quote-Args @( "--install", "${buildDir}", "--config", "${config}")
|
$argList = @( "--install", "${buildDir}", "--config", "${config}")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
Push-Location ${buildDir}
|
Push-Location ${buildDir}
|
||||||
Write-Host "** ${phaseCommand} ${argList}"
|
Write-Host "** ${phaseCommand} $(Quote-Args ${argList})"
|
||||||
& $phaseCommand @arglist
|
& $phaseCommand @arglist
|
||||||
if ($LastExitCode -gt 0) {
|
if ($LastExitCode -gt 0) {
|
||||||
$printPhase = (Get-Culture).TextInfo.ToTitleCase($phase)
|
$printPhase = (Get-Culture).TextInfo.ToTitleCase($phase)
|
||||||
|
|
Loading…
Add table
Reference in a new issue