mirror of
https://github.com/Kitware/CMake.git
synced 2026-03-13 12:59:55 -05: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:
@@ -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