summaryrefslogtreecommitdiffstats
path: root/Source/cmGeneratorTarget.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2022-02-22 17:56:44 (GMT)
committerKitware Robot <kwrobot@kitware.com>2022-02-22 17:56:51 (GMT)
commit8bbca4ecf9e872edc96bc43d807e74c4af1d6ea0 (patch)
tree168d029d7dc8b112f6169f3c4ca72eb42fc788b4 /Source/cmGeneratorTarget.cxx
parente2587d6f5ef2f7de31dd950d192c7bc5701d1da5 (diff)
parentf75299b80380c13ff29c934c3a5ad35ba5e3da1c (diff)
downloadCMake-8bbca4ecf9e872edc96bc43d807e74c4af1d6ea0.zip
CMake-8bbca4ecf9e872edc96bc43d807e74c4af1d6ea0.tar.gz
CMake-8bbca4ecf9e872edc96bc43d807e74c4af1d6ea0.tar.bz2
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
Diffstat (limited to 'Source/cmGeneratorTarget.cxx')
-rw-r--r--Source/cmGeneratorTarget.cxx8
1 files changed, 3 insertions, 5 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index e722fa9..a246c12 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -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") {