diff options
| author | nicole mazzuca <mazzucan@outlook.com> | 2021-03-22 13:53:45 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-03-22 13:53:45 -0700 |
| commit | 062676d92b3ca9608728f48f10080712b98e0463 (patch) | |
| tree | 3f4721087d06509ed58f57193bb0ce1cc221418f /scripts | |
| parent | e2e6dbdaa45c40fe2e3ec7753b40d92d1dcab16e (diff) | |
| download | vcpkg-062676d92b3ca9608728f48f10080712b98e0463.tar.gz vcpkg-062676d92b3ca9608728f48f10080712b98e0463.zip | |
[msbuild] fix integration caching (#16787)
we would always run on build, as opposed to only running when changes happened
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/buildsystems/msbuild/vcpkg.targets | 28 |
1 files changed, 19 insertions, 9 deletions
diff --git a/scripts/buildsystems/msbuild/vcpkg.targets b/scripts/buildsystems/msbuild/vcpkg.targets index b99011324..7653c4e91 100644 --- a/scripts/buildsystems/msbuild/vcpkg.targets +++ b/scripts/buildsystems/msbuild/vcpkg.targets @@ -73,31 +73,41 @@ Importance="High" Condition="'$(VcpkgEnabled)' == 'true' and '$(VcpkgNormalizedConfiguration)' == ''"/> </Target> - <ItemGroup> - <_ZVcpkgInstallManifestDependenciesInputs Include="$(VcpkgManifestRoot)vcpkg.json"/> - <_ZVcpkgInstallManifestDependenciesInputs Include="$(VcpkgManifestRoot)vcpkg-configuration.json" Condition="Exists('$(VcpkgManifestRoot)vcpkg-configuration.json')"/> + <PropertyGroup Condition="'$(VcpkgEnabled)' == 'true'"> + <_ZVcpkgManifestFileLocation>$(VcpkgManifestRoot)vcpkg.json </_ZVcpkgManifestFileLocation> + <_ZVcpkgConfigurationFileLocation>$(VcpkgManifestRoot)vcpkg-configuration.json</_ZVcpkgConfigurationFileLocation> + + <_ZVcpkgTLogFileLocation>$(TLogLocation)VcpkgInstallManifest$(VcpkgTriplet).$(VcpkgHostTriplet).read.1u.tlog</_ZVcpkgTLogFileLocation> + <_ZVcpkgMSBuildStampFile>$(VcpkgInstalledDir).msbuildstamp-$(VcpkgTriplet).$(VcpkgHostTriplet).stamp</_ZVcpkgMSBuildStampFile> + </PropertyGroup> + <ItemGroup Condition="'$(VcpkgEnabled)' == 'true'"> + <_ZVcpkgInstallManifestDependenciesInputs Include="$(_ZVcpkgManifestFileLocation)"/> + <_ZVcpkgInstallManifestDependenciesInputs Include="$(_ZVcpkgConfigurationFileLocation)" Condition="Exists('$(_ZVcpkgConfigurationFileLocation)')"/> + + <_ZVcpkgInstallManifestDependenciesOutputs Include="$(_ZVcpkgTLogFileLocation)"/> + <_ZVcpkgInstallManifestDependenciesOutputs Include="$(_ZVcpkgMSBuildStampFile)"/> </ItemGroup> <Target Name="VcpkgInstallManifestDependencies" BeforeTargets="ClCompile" Condition="'$(VcpkgEnabled)' == 'true' and '$(VcpkgEnableManifest)' == 'true' and '$(VcpkgManifestInstall)' == 'true'" Inputs="@(_ZVcpkgInstallManifestDependenciesInputs)" - Outputs="$(TLogLocation)VcpkgInstallManifest$(VcpkgTriplet).read.1u.tlog;$(VcpkgInstalledDir).msbuildstamp-$(VcpkgTriplet).$(VcpkgHostTriplet).stamp"> + Outputs="@(_ZVcpkgInstallManifestDependenciesOutputs)"> <Message Text="Installing vcpkg dependencies to $(VcpkgInstalledDir)" Importance="High" /> <MakeDir Directories="$(TLogLocation)" /> <ItemGroup> - <_VcpkgItemToDelete Include="$(TLogLocation)VcpkgInstallManifest*.read.1u.tlog" /> - <_VcpkgItemToDelete Include="$(VcpkgInstalledDir).msbuildstamp-*" /> + <_ZVcpkgItemToDelete Include="$(TLogLocation)VcpkgInstallManifest*.read.1u.tlog" /> + <_ZVcpkgItemToDelete Include="$(VcpkgInstalledDir).msbuildstamp-*" /> </ItemGroup> - <Delete Files="@(_VcpkgItemToDelete)" /> + <Delete Files="@(_ZVcpkgItemToDelete)" /> <Message Text="%22$(_ZVcpkgExecutable)%22 install $(_ZVcpkgHostTripletParameter) --x-wait-for-lock --triplet %22$(VcpkgTriplet)%22 --vcpkg-root %22$(VcpkgRoot)\%22 %22--x-manifest-root=$(VcpkgManifestRoot)\%22 %22--x-install-root=$(VcpkgInstalledDir)\%22 $(VcpkgAdditionalInstallOptions)" Importance="High" /> <Exec Command="%22$(_ZVcpkgExecutable)%22 install $(_ZVcpkgHostTripletParameter) --x-wait-for-lock --triplet %22$(VcpkgTriplet)%22 --vcpkg-root %22$(VcpkgRoot)\%22 %22--x-manifest-root=$(VcpkgManifestRoot)\%22 %22--x-install-root=$(VcpkgInstalledDir)\%22 $(VcpkgAdditionalInstallOptions)" StandardOutputImportance="High" /> - <WriteLinesToFile File="$(TLogLocation)VcpkgInstallManifest$(VcpkgTriplet).$(VcpkgHostTriplet).read.1u.tlog" + <WriteLinesToFile File="$(_ZVcpkgTLogFileLocation)" Lines="@(_VcpkgInstallManifestDependenciesInputs -> '^%(Identity)')" Encoding="Unicode" Overwrite="true"/> - <Touch Files="$(VcpkgInstalledDir).msbuildstamp-$(VcpkgTriplet).$(VcpkgHostTriplet).stamp" AlwaysCreate="true" /> + <Touch Files="$(_ZVcpkgMSBuildStampFile)" AlwaysCreate="true" /> <CreateProperty Value="false"> <Output TaskParameter="ValueSetByTask" PropertyName="Link_MinimalRebuildFromTracking" /> |
