Merge topic 'cuda-archs'

f75299b803 CUDA: Restore support for non-"all" CUDA_ARCHITECTURES with nvcc 11.5+

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7007
This commit is contained in:
Brad King
2022-02-22 17:56:44 +00:00
committed by Kitware Robot

View File

@@ -3456,12 +3456,10 @@ void cmGeneratorTarget::AddCUDAArchitectureFlags(std::string& flags) const
cmSystemTools::OP_GREATER_EQUAL,
this->Makefile->GetDefinition("CMAKE_CUDA_COMPILER_VERSION"),
"11.5")) {
if (property == "all") {
flags += " -arch=all";
} else if (property == "all-major") {
flags += " -arch=all-major";
if (property == "all" || property == "all-major") {
flags = cmStrCat(flags, " -arch=", property);
return;
}
return;
}
if (property == "all") {