diff options
author | Brad King <brad.king@kitware.com> | 2024-01-18 18:16:13 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2024-01-18 18:23:42 (GMT) |
commit | 45d53bdb70d68bb6a2fb4c91715c1edc0f291795 (patch) | |
tree | 0fe6123cef6c5071b2b08fed363de479883b7aae /Source | |
parent | c75047709f2ee2a3f8791f19b9ce8cc76e633521 (diff) | |
download | CMake-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.cxx | 2 |
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; |