Skip to content

Commit a62c106

Browse files
committed
msvc: Allow overriding of build options with custom file
- by default look for a user.props in the msvc directory, which is more convenient than the built-in way of looking for such file in the user's home directory - make git ignore the file
1 parent 6f218d7 commit a62c106

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,5 +33,7 @@ tests/*.out
3333
######################
3434
__pycache__/
3535

36-
# Customized Makefile overrides
36+
# Customized Makefile/project overrides
37+
######################
3738
GNUmakefile
39+
user.props

windows/micropython.vcxproj

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,9 @@
7272
<Import Project="msvc/common.props" />
7373
<Import Project="msvc/release.props" />
7474
</ImportGroup>
75-
<PropertyGroup Label="UserMacros" />
75+
<PropertyGroup Label="UserMacros">
76+
<CustomPropsFile Condition="'$(CustomPropsFile)'==''">msvc/user.props</CustomPropsFile>
77+
</PropertyGroup>
7678
<PropertyGroup />
7779
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
7880
<ClCompile />
@@ -94,6 +96,7 @@
9496
</ItemGroup>
9597
<Import Project="msvc/sources.props" />
9698
<Import Project="msvc/genhdr.targets" />
99+
<Import Project="$(CustomPropsFile)" Condition="exists('$(CustomPropsFile)')" />
97100
<Target Name="GenHeaders" BeforeTargets="BuildGenerateSources" DependsOnTargets="GenerateHeaders">
98101
</Target>
99102
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />

0 commit comments

Comments
 (0)