diff options
author | Raul Tambre <raul@tambre.ee> | 2021-12-28 12:29:52 (GMT) |
---|---|---|
committer | Raul Tambre <raul@tambre.ee> | 2022-01-27 19:43:52 (GMT) |
commit | d19273bc7b361a54041706c02857993e244d3b50 (patch) | |
tree | 131a68d00231d66636f6f3c7781d015f118cc93d /Source | |
parent | 5f667d783a917a2dc70fcdfaede6c3fbdc3c9549 (diff) | |
download | CMake-d19273bc7b361a54041706c02857993e244d3b50.zip CMake-d19273bc7b361a54041706c02857993e244d3b50.tar.gz CMake-d19273bc7b361a54041706c02857993e244d3b50.tar.bz2 |
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.
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmVisualStudioGeneratorOptions.cxx | 4 |
1 files changed, 4 insertions, 0 deletions
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=<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], ","); |