Skip to content

CMakeDetermineCompilerId: Can not pass -allow-unsupported-compiler flag in CUDA

May be because of this change, !5863 (merged), I could not pass -allow-unsupported-compiler flag in CMakeDetermineCompilerId for CUDA. This causes an error in CUDA's host compiler check in some cases. I'm currently using CUDA11.1 on Ubuntu 22.04, so the default GCC version is higher than the supported one and cause this error.

One of the quick workarounds is to use update-alternatives to change the /usr/bin/gcc to gcc-10, but it seems to be not a clever solution.

Is there any way to force use specified options in CMakeDetermineCompilerId?

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information