Skip to content

Commit acb6178

Browse files
committed
fix win cccl
1 parent ad48185 commit acb6178

4 files changed

Lines changed: 19 additions & 2 deletions

File tree

‎.gitattributes‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.ps1 text eol=crlf

‎.github/workflows/build.yml‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,6 @@ jobs:
5656
path: ${{ env.CCACHE_DIR }}
5757
key: ccache-${{ runner.os }}-cu${{ matrix.cuda-version }}-${{ hashFiles('conda/recipe.yaml', 'conda/variants.yaml') }}
5858
restore-keys: ccache-${{ runner.os }}-cu${{ matrix.cuda-version }}-
59-
- if: matrix.os == 'windows' && matrix.cuda-version == 'None'
60-
uses: ilammy/msvc-dev-cmd@v1
6159
- name: config
6260
id: config
6361
run: |

‎conda/recipe.yaml‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ build:
3838
# TODO: use scikit-build-core & setuptools_scm instead
3939
- if: win
4040
then:
41+
# fix conda-forge::cuda-cccl win-64 cmake config headers
42+
- powershell -NoProfile -File "%RECIPE_DIR%\win-cccl-junctions.ps1"
4143
- cmake -S . %CMAKE_ARGS% -DCMAKE_INSTALL_PREFIX=%SRC_DIR%\src\Python\ccpi\filters\ %CMAKE_EXTRA_ARGS%
4244
- cmake --build . --target install --config RelWithDebInfo
4345
- pip install -vv %SRC_DIR%\src\Python --prefix=%PREFIX%

‎conda/win-cccl-junctions.ps1‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# work-around conda-forge::cuda-cccl win-64 packaging bug:
2+
# junction Library/include/targets/x64/{cccl,thrust,cub,cuda} into Library/include{,/cccl}
3+
# so find_package(Thrust|CUB|libcudacxx) works
4+
$ErrorActionPreference = "Stop"
5+
$inc = Join-Path $env:PREFIX "Library\include"
6+
$t = Join-Path $inc "targets\x64"
7+
if (Test-Path $t) {
8+
foreach ($d in Get-ChildItem $t -Directory) {
9+
if (-not (Test-Path (Join-Path $inc $d.Name))) {
10+
New-Item -ItemType Junction -Path (Join-Path $inc $d.Name) -Target $d.FullName | Out-Null
11+
}
12+
}
13+
if ((Test-Path (Join-Path $t "cuda\std")) -and -not (Test-Path (Join-Path $inc "cuda\std"))) {
14+
New-Item -ItemType Junction -Path (Join-Path $inc "cuda\std") -Target (Join-Path $t "cuda\std") | Out-Null
15+
}
16+
}

0 commit comments

Comments
 (0)