Skip to content

Commit

Permalink
VS Integration Files: Auto
Browse files Browse the repository at this point in the history
  • Loading branch information
ax3l committed Apr 11, 2024
1 parent c8237d9 commit d8511e9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/dependencies/windows_install_cuda.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
# License: BSD-3-Clause-LBNL
# Authors: Axel Huebl

# fail on first error
$ErrorActionPreference = "Stop"

# skip if already installed
if (Test-Path "C:\Program Files\NVIDIA GPU Computing Toolkit\") { exit }

Expand Down Expand Up @@ -55,10 +58,6 @@ Start-Process -FilePath '.\cuda_install.exe' -ArgumentList @($SilentFlag + $Cuda
# cleanup
Remove-Item cuda_install.exe

# VisualStudio integration
Copy-item -Force -Recurse -Verbose "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v${cuda_version_short}\extras\visual_studio_integration\MSBuildExtensions" -Destination "C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\MSBuild\Microsoft\VC\v170\BuildCustomizations"
Copy-item -Force -Recurse -Verbose "C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v${cuda_version_short}\extras\visual_studio_integration\MSBuildExtensions" -Destination "C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\BuildCustomizations"

# GitHub actions env updates
if (Test-Path "env:GITHUB_ACTIONS") {
echo "Adding CUDA to CUDA_PATH and PATH"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ jobs:
cmake -S . -B build ^
-A x64 ^
-DCMAKE_VS_PLATFORM_TOOLSET_CUDA="cuda=12.4" ^
-DCMAKE_GENERATOR_TOOLSET="cuda=12.4" ^
-DCUDA_TOOLKIT_ROOT_DIR="%CUDA_PATH%" ^
-DCUDAToolkit_ROOT="%CUDA_PATH%" ^
-DCMAKE_BUILD_TYPE=Release ^
Expand Down

0 comments on commit d8511e9

Please sign in to comment.