mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-10-12 23:43:59 +03:00
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=...'
This commit is contained in:
1 parent
c75047709f
commit
45d53bdb70
1 file changed
+1
-1
@@ -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;
|
||||
|
||||
|
||||
Reference in new issue
Block a user