windows/msvc: Fix preprocessing command for quoted definitions.

Supports preprocessor definitions like /Dval="quotedvalue" by turning
that into /Dval=\"quotedvalue\".

Signed-off-by: stijn <stijn@ignitron.net>
pull/12810/head
stijn 2024-03-25 14:32:57 +01:00
rodzic 0c5a399eb3
commit 35e504f061
1 zmienionych plików z 3 dodań i 1 usunięć

Wyświetl plik

@ -82,7 +82,9 @@ using(var outFile = System.IO.File.CreateText(OutputFile)) {
</QstrDependencies>
</ItemGroup>
<PropertyGroup>
<PyPreProcCommand>$(PyClTool) /nologo /I@(PyIncDirs, ' /I') /D@(PreProcDefs, ' /D')</PyPreProcCommand>
<!--Command is going to run via shell so need to escape quotes. -->
<UnescapedPreProcDefs>/D@(PreProcDefs, ' /D')</UnescapedPreProcDefs>
<PyPreProcCommand>$(PyClTool) /nologo /I@(PyIncDirs, ' /I') $([System.String]::Copy('$(UnescapedPreProcDefs)').Replace('"','\"'))</PyPreProcCommand>
<ForceQstrRebuild>@(QstrDependencies->AnyHaveMetadataValue('Changed', 'True'))</ForceQstrRebuild>
<RunPreProcConcat>@(PyQstrSourceFiles->AnyHaveMetadataValue('Changed', 'True'))</RunPreProcConcat>
</PropertyGroup>