mirror of
https://github.com/Kitware/CMake.git
synced 2026-04-27 01:19:31 -05:00
VS: Avoid unnecessary CUDA device linking for OBJECT libraries
Without `CudaLink` fields, MSBuild tries to perform a device link step for object libraries with CUDA_SEPARABLE_COMPILATION on them even when not needed. This commonly was encountered when generating PTX or OPTIX-IR output.
This commit is contained in:
committed by
Brad King
parent
9aa25ed804
commit
6ebff6ebf8
@@ -3855,7 +3855,10 @@ bool cmVisualStudio10TargetGenerator::ComputeCudaLinkOptions(
|
||||
void cmVisualStudio10TargetGenerator::WriteCudaLinkOptions(
|
||||
Elem& e1, std::string const& configName)
|
||||
{
|
||||
if (this->GeneratorTarget->GetType() > cmStateEnums::MODULE_LIBRARY) {
|
||||
// We need to write link options for OBJECT libraries so that
|
||||
// we override the default device link behavior ( enabled ) when
|
||||
// building object libraries with ptx/optix-ir/etc
|
||||
if (this->GeneratorTarget->GetType() > cmStateEnums::OBJECT_LIBRARY) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user