Skip to content

Commit

Permalink
Relax constraints, use c_compiler / cxx_compiler variables.
Browse files Browse the repository at this point in the history
  • Loading branch information
bdice authored Jan 3, 2024
1 parent 406c077 commit 260b724
Showing 1 changed file with 4 additions and 19 deletions.
23 changes: 4 additions & 19 deletions recipe/meta.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,25 +23,10 @@ outputs:
requirements:
run:
- cuda-nvcc_{{ target_platform }} {{ version }}.*

# cuda-nvcc has runtime dependencies on C and C++ compilers, but needs
# to support a wider range of host compilers than only the latest
# versions pinned in conda-forge-pinning-feedstock. Therefore, we
# cannot just list compiler('c') and compiler('cxx') as dependencies.
# However, we only need to do this for Linux because Windows has
# separate package names for each compiler version, like vs2019 and
# vs2022, and we can use compiler('c') and compiler('cxx') to get
# those.
#
# The compiler names for compiler('c') and compiler('cxx') come from
# https://github.com/conda-forge/conda-forge-pinning-feedstock/blob/main/recipe/conda_build_config.yaml
# The supported host compiler versions for a given nvcc version come from
# https://docs.nvidia.com/cuda/cuda-installation-guide-linux/index.html
# https://docs.nvidia.com/cuda/cuda-installation-guide-microsoft-windows/index.html
- gcc_{{ target_platform }} >=6,<13 # [linux]
- gxx_{{ target_platform }} >=6,<13 # [linux]
- compiler('c') # [not linux]
- compiler('cxx') # [not linux]
# Relax build time constraints from compilers
# Constraints on compilers exist in `cuda-nvcc-impl`
- {{ c_compiler }}_{{ target_platform }}
- {{ cxx_compiler }}_{{ target_platform }}
test:
commands:
- test -f $PREFIX/bin/nvcc # [linux]
Expand Down

0 comments on commit 260b724

Please sign in to comment.