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 d94d725
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 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 @@ -47,18 +50,15 @@ $CudaFeatures = " nvcc_${cuda_version_short} " + `
" nvrtc_dev_${cuda_version_short} " + `
" nvtx_${cuda_version_short} " + `
" sanitizer_${cuda_version_short} " + `
" thrust_${cuda_version_short} "
" thrust_${cuda_version_short} " + `
" visual_studio_integration_${cuda_version_short} "

$SilentFlag = '-s '
Start-Process -FilePath '.\cuda_install.exe' -ArgumentList @($SilentFlag + $CudaFeatures) -Wait -NoNewWindow

# 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 d94d725

Please sign in to comment.