diff --git a/mesonbuild/modules/cuda.py b/mesonbuild/modules/cuda.py index d3ff99225..9e2c166c9 100644 --- a/mesonbuild/modules/cuda.py +++ b/mesonbuild/modules/cuda.py @@ -337,7 +337,7 @@ class CudaModule(NewExtensionModule): if version_compare(arch, '<' + cuda_lo_limit_gpu_architecture): continue - if version_compare(arch, '>=' + cuda_hi_limit_gpu_architecture): + if cuda_hi_limit_gpu_architecture and version_compare(arch, '>=' + cuda_hi_limit_gpu_architecture): continue if codev: @@ -359,7 +359,7 @@ class CudaModule(NewExtensionModule): if version_compare(arch, '<' + cuda_lo_limit_gpu_architecture): continue - if version_compare(arch, '>=' + cuda_hi_limit_gpu_architecture): + if cuda_hi_limit_gpu_architecture and version_compare(arch, '>=' + cuda_hi_limit_gpu_architecture): continue arch = arch.replace('.', '')