mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-05 21:31:08 -06:00
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.
This commit is contained in:
@@ -182,6 +182,10 @@ void cmVisualStudioGeneratorOptions::FixCudaCodeGeneration()
|
||||
// First entries for the -arch=<arch> [-code=<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<std::string> codes;
|
||||
if (!code.empty()) {
|
||||
codes = cmTokenize(code[0], ",");
|
||||
|
||||
Reference in New Issue
Block a user