Skip to content

Commit

Permalink
bpo-45931: Prevent Directory.Build.props/targets from leaking from di…
Browse files Browse the repository at this point in the history
…rectories above the repo when building on Windows (pythonGH-29854)

(cherry picked from commit 734ed35)

Co-authored-by: David Federman <david.federman@outlook.com>
  • Loading branch information
dfederm authored and miss-islington committed Nov 29, 2021
1 parent 32f1491 commit 5c216af
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
4 changes: 4 additions & 0 deletions PCbuild/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- This is intentionally left blank but exists to avoid being imported from some directory above -->
</Project>
4 changes: 4 additions & 0 deletions PCbuild/Directory.Build.targets
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<!-- This is intentionally left blank but exists to avoid being imported from some directory above -->
</Project>
4 changes: 2 additions & 2 deletions PCbuild/python.props
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
We set BasePlatformToolset for ICC's benefit, it's otherwise ignored.
-->
<BasePlatformToolset Condition="'$(BasePlatformToolset)' == '' and ('$(MSBuildToolsVersion)' == '17.0' or '$(VisualStudioVersion)' == '17.0')">v142</BasePlatformToolset>
<BasePlatformToolset Condition="'$(BasePlatformToolset)' == '' and ('$(MSBuildToolsVersion)' == '16.0' or '$(VisualStudioVersion)' == '16.0')">v142</BasePlatformToolset>
<BasePlatformToolset Condition="'$(BasePlatformToolset)' == '' and '$(VisualStudioVersion)' == '17.0'">v142</BasePlatformToolset>
<BasePlatformToolset Condition="'$(BasePlatformToolset)' == '' and '$(VisualStudioVersion)' == '16.0'">v142</BasePlatformToolset>
<BasePlatformToolset Condition="'$(BasePlatformToolset)' == '' and ('$(MSBuildToolsVersion)' == '15.0' or '$(VisualStudioVersion)' == '15.0')">v141</BasePlatformToolset>
<BasePlatformToolset Condition="'$(BasePlatformToolset)' == '' and '$(VCTargetsPath14)' != ''">v140</BasePlatformToolset>
<BasePlatformToolset Condition="'$(BasePlatformToolset)' == '' and '$(VCTargetsPath12)' != ''">v120</BasePlatformToolset>
Expand Down

0 comments on commit 5c216af

Please sign in to comment.