summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorstijn <stijn@ignitron.net>2017-05-01 10:50:58 +0200
committerDamien George <damien.p.george@gmail.com>2017-05-03 10:41:53 +1000
commitab4a8618cffc02d0838bd64372b066c99c2d2d7e (patch)
treedc9a976f9844bbb830396b916f8ec91138e6fc55
parent5b57ae985ff7064dd7b09b0ce891697bfaa5dae2 (diff)
downloadmicropython-ab4a8618cffc02d0838bd64372b066c99c2d2d7e.tar.gz
micropython-ab4a8618cffc02d0838bd64372b066c99c2d2d7e.zip
msvc: Workaround parser bug in older MSBuild versions
Versions prior to v14.0 have a bug in parsing item functions when used within a condition: https://github.com/Microsoft/msbuild/issues/368. Since commit [db9c2e3] this results in an error when building MicroPython with for example VS2013. Fix this by creating an intermediate property.
-rw-r--r--windows/msvc/genhdr.targets3
1 files changed, 2 insertions, 1 deletions
diff --git a/windows/msvc/genhdr.targets b/windows/msvc/genhdr.targets
index 5792d878ec..cac3e3ddc4 100644
--- a/windows/msvc/genhdr.targets
+++ b/windows/msvc/genhdr.targets
@@ -69,13 +69,14 @@ using(var outFile = System.IO.File.CreateText(OutputFile)) {
</ItemGroup>
<PropertyGroup>
<ForceQstrRebuild>@(QstrDependencies->AnyHaveMetadataValue('Changed', 'True'))</ForceQstrRebuild>
+ <RunPreProcConcat>@(PyQstrSourceFiles->AnyHaveMetadataValue('Changed', 'True'))</RunPreProcConcat>
</PropertyGroup>
<MakeDir Directories="@(PyQstrSourceFiles->'%(OutDir)')"/>
<Exec Command="cl /nologo /I@(PyIncDirs, ' /I') /D@(PreProcDefs, ' /D') /Fi%(PyQstrSourceFiles.OutFile) /P %(PyQstrSourceFiles.Identity)"
Condition="'%(PyQstrSourceFiles.Changed)' == 'True' Or '$(ForceQstrRebuild)' == 'True'"/>
<ConcatPreProcFiles InputFiles="@(PyQstrSourceFiles->'%(OutFile)')" OutputFile="$(DestDir)qstr.i.last"
- Condition="@(PyQstrSourceFiles->AnyHaveMetadataValue('Changed', 'True')) Or '$(ForceQstrRebuild)' == 'True'"/>
+ Condition="'$(RunPreProcConcat)' == 'True' Or '$(ForceQstrRebuild)' == 'True'"/>
<Exec Command="$(PyPython) $(PySrcDir)makeqstrdefs.py split $(DestDir)qstr.i.last $(DestDir)qstr $(QstrDefsCollected)"/>
<Exec Command="$(PyPython) $(PySrcDir)makeqstrdefs.py cat $(DestDir)qstr.i.last $(DestDir)qstr $(QstrDefsCollected)"/>
</Target>