CMAKE_CUDA_ARCHITECTURES: Support value for "none"
Some projects or packagers may want to specify compiler-specific architecture flags explicitly in e.g. CMAKE_CUDA_FLAGS
. With policy CMP0104's NEW
behavior, there is no longer a way to do this.
We could support the use case by using a special value for CMAKE_CUDA_ARCHITECTURES
, and therefore the CUDA_ARCHITECTURES
target property, that means "do not add any architecture flags". The value could be called NONE
or perhaps any of our typical boolean false values, like OFF
or NO
or 0
. That would allow packagers to use
-DCMAKE_CUDA_ARCHITECTURES=OFF -DCMAKE_CUDA_FLAGS="..."
where ...
contains the architecture flags for the compiler in use.