Fix: Do not clone when folder vcpkg exist

This commit is contained in:
Tal Regev 2021-08-24 22:43:37 +03:00
parent d62fb80d8f
commit 7da37045f7
No known key found for this signature in database
GPG Key ID: A421558E0F87AC82
2 changed files with 5 additions and 4 deletions

View File

@ -1,6 +1,7 @@
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<VcpkgRootDir Condition="'$(VcpkgRootDir)' == ''">$(MSBuildThisFileDirectory)..\3rdParty\Windows\vcpkg</VcpkgRootDir>
<Windows3rdPartyBuildDir Condition="'$(Windows3rdPartyBuildDir)' == ''">$(MSBuildThisFileDirectory)..\3rdParty\Windows</Windows3rdPartyBuildDir>
<VcpkgRootDir Condition="'$(VcpkgRootDir)' == ''">$(Windows3rdPartyBuildDir)\vcpkg</VcpkgRootDir>
<VcpkgExe>$(VcpkgRootDir)\vcpkg.exe</VcpkgExe>
<VcpkgTripletConfig Condition="'$(VcpkgTripletConfig)' == ''">default</VcpkgTripletConfig>
<VcpkgCacheDir Condition="'$(VcpkgCacheDir)' == ''">..\..\boinc_depends_win_vs2019</VcpkgCacheDir>

View File

@ -90,8 +90,8 @@
<Target Name="CleanUpCudaFolder" BeforeTargets="CreateFolders" Condition="Exists($(CudaRootDir)) And !Exists($(CudaGuardFile))">
<RemoveDir Directories="$(CudaRootDir)"/>
</Target>
<Target Name="CreateFolders" BeforeTargets="InstallVcpkg" DependsOnTargets="CleanUpCudaFolder" Condition="!Exists($(VcpkgRootDir)) Or !Exists($(CudaRootDir))">
<MakeDir Directories="$(VcpkgRootDir)" />
<Target Name="CreateFolders" BeforeTargets="InstallVcpkg" DependsOnTargets="CleanUpCudaFolder" Condition="!Exists($(Windows3rdPartyBuildDir)) Or !Exists($(CudaRootDir))">
<MakeDir Directories="$(Windows3rdPartyBuildDir)" />
<MakeDir Directories="$(CudaRootDir)" />
</Target>
<Target Name="DownloadCUDA" BeforeTargets="InstallVcpkg" DependsOnTargets="CreateFolders" AfterTargets="CreateFolders" Condition="!Exists($(CudaNvccPath)) And !Exists($(CudaGuardFile))">
@ -104,7 +104,7 @@
<Touch Files="$(CudaGuardFile)" AlwaysCreate="true" />
</Target>
<Target Name="InstallVcpkg" BeforeTargets="Build3rdPartyLibraries" DependsOnTargets="CreateFolders" AfterTargets="DownloadCUDA">
<Exec Command="git clone https://github.com/microsoft/vcpkg ." WorkingDirectory="$(VcpkgRootDir)" ConsoleToMSBuild="true" Condition="!Exists($(VcpkgExe))" />
<Exec Command="git clone https://github.com/microsoft/vcpkg" WorkingDirectory="$(Windows3rdPartyBuildDir)" ConsoleToMSBuild="true" Condition="!Exists($(VcpkgRootDir))" />
<Exec Command="git pull" WorkingDirectory="$(VcpkgRootDir)" ConsoleToMSBuild="true" />
<Exec Command="bootstrap-vcpkg.bat" WorkingDirectory="$(VcpkgRootDir)" ConsoleToMSBuild="true" />
</Target>