From d19273bc7b361a54041706c02857993e244d3b50 Mon Sep 17 00:00:00 2001 From: Raul Tambre Date: Tue, 28 Dec 2021 14:29:52 +0200 Subject: CUDA: Support all and all-major on Visual Studio The Visual Studio integration's CodeGeneration option only knows how to generate a -gencode flag, which doesn't recognize all. Add a special case to pass these two as regular additional flags. --- Source/cmVisualStudioGeneratorOptions.cxx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Source/cmVisualStudioGeneratorOptions.cxx b/Source/cmVisualStudioGeneratorOptions.cxx index 5c17a07..9045a4d 100644 --- a/Source/cmVisualStudioGeneratorOptions.cxx +++ b/Source/cmVisualStudioGeneratorOptions.cxx @@ -182,6 +182,10 @@ void cmVisualStudioGeneratorOptions::FixCudaCodeGeneration() // First entries for the -arch= [-code=,...] pair. if (!arch.empty()) { std::string arch_name = arch[0]; + if (arch_name == "all" || arch_name == "all-major") { + AppendFlagString("AdditionalOptions", "-arch=" + arch_name); + return; + } std::vector codes; if (!code.empty()) { codes = cmTokenize(code[0], ","); -- cgit v0.12