summarylogtreecommitdiffstats
path: root/PKGBUILD
diff options
context:
space:
mode:
authorbartus2022-06-17 13:56:02 +0200
committerbartus2022-06-17 13:56:02 +0200
commitfde5b6b3adf86eb125263b1f38240ed181b8c77d (patch)
tree44668c8b613e551ad07684cf5021d4ccc4f165bf /PKGBUILD
parenta9e4b91b997fa3935a1401a3f81f7a216744dfd4 (diff)
downloadaur-fde5b6b3adf86eb125263b1f38240ed181b8c77d.tar.gz
Fix cuda host compiler
Diffstat (limited to 'PKGBUILD')
-rw-r--r--PKGBUILD4
1 files changed, 4 insertions, 0 deletions
diff --git a/PKGBUILD b/PKGBUILD
index 24d242659ab1..c7f58630aa5a 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -47,6 +47,10 @@ build() {
# determine whether we can precompile CUDA kernels
_CUDA_PKG=$(pacman -Qsq cuda 2>/dev/null) || true
if [[ -n "$_CUDA_PKG" && "$_BUILD_CUDA" == "ON" ]]; then
+ # determine whether we need to define cuda host compiler
+ if _cuda_gcc=$(readlink /opt/cuda/bin/gcc) ; then
+ [ -f "$_cuda_gcc" ] && export CUDAHOSTCXX="$_cuda_gcc"
+ fi
_CMAKE_FLAGS+=( -DCUDA_ENABLED=ON
-DCUDA_TOOLKIT_ROOT_DIR=/opt/cuda
-DCUDA_ARCHS="$_CUDA_ARCH"