Explorar o código

Merge topic 'cuda-archs' into release-3.23

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

Acked-by: Kitware Robot <[email protected]>
Merge-request: !7007
Brad King %!s(int64=3) %!d(string=hai) anos
pai
achega
2e963c41b4
Modificáronse 1 ficheiros con 3 adicións e 5 borrados
  1. 3 5
      Source/cmGeneratorTarget.cxx

+ 3 - 5
Source/cmGeneratorTarget.cxx

@@ -3452,12 +3452,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") {