[vcpkg] msbuild: do not build vcpkgmetricsuploader when -disableMetrics (#11368)

This commit is contained in:
Markus Rickert 2020-05-18 20:05:23 +02:00 committed by GitHub
parent 9f516b9347
commit 47e9a1d1c1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 2 deletions

View File

@ -426,5 +426,10 @@ Read more about vcpkg telemetry at docs/about/privacy.md
Write-Verbose "Placing vcpkg.exe in the correct location"
Copy-Item "$vcpkgReleaseDir\vcpkg.exe" "$vcpkgRootDir\vcpkg.exe"
Copy-Item "$vcpkgReleaseDir\vcpkgmetricsuploader.exe" "$vcpkgRootDir\scripts\vcpkgmetricsuploader.exe"
if (-not $disableMetrics)
{
Copy-Item "$vcpkgReleaseDir\vcpkgmetricsuploader.exe" "$vcpkgRootDir\scripts\vcpkgmetricsuploader.exe"
}
Remove-Item "$vcpkgReleaseDir" -Force -Recurse -ErrorAction SilentlyContinue

View File

@ -5,7 +5,7 @@
<ItemGroup>
<ProjectFile Include="vcpkglib\vcpkglib.vcxproj"/>
<ProjectFile Include="vcpkg\vcpkg.vcxproj"/>
<ProjectFile Include="vcpkgmetricsuploader\vcpkgmetricsuploader.vcxproj"/>
<ProjectFile Include="vcpkgmetricsuploader\vcpkgmetricsuploader.vcxproj" Condition="'$(DISABLE_METRICS)'!='1'"/>
</ItemGroup>
<Target Name="Rebuild" DependsOnTargets="Clean;Build" />