summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2024-01-18 18:16:13 (GMT)
committerBrad King <brad.king@kitware.com>2024-01-18 18:23:42 (GMT)
commit45d53bdb70d68bb6a2fb4c91715c1edc0f291795 (patch)
tree0fe6123cef6c5071b2b08fed363de479883b7aae /Source
parentc75047709f2ee2a3f8791f19b9ce8cc76e633521 (diff)
downloadCMake-45d53bdb70d68bb6a2fb4c91715c1edc0f291795.zip
CMake-45d53bdb70d68bb6a2fb4c91715c1edc0f291795.tar.gz
CMake-45d53bdb70d68bb6a2fb4c91715c1edc0f291795.tar.bz2
CUDA/Clang: Do not pass explicit architecture flags when linking
Clang does not use architecture flags while driving the linker: warning: argument unused during compilation: '--cuda-gpu-arch=...'
Diffstat (limited to 'Source')
-rw-r--r--Source/cmGeneratorTarget.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index 11253db..d743d01 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -3578,7 +3578,7 @@ void cmGeneratorTarget::AddCUDAArchitectureFlagsImpl(cmBuildStep compileOrLink,
flags += "]\"";
}
- } else if (compiler == "Clang") {
+ } else if (compiler == "Clang" && compileOrLink == cmBuildStep::Compile) {
for (CudaArchitecture& architecture : architectures) {
flags += " --cuda-gpu-arch=sm_" + architecture.name;