diff options
author | Brad King <brad.king@kitware.com> | 2023-09-12 13:05:56 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2023-09-12 13:06:15 (GMT) |
commit | 93d813d87c9e54488e19ad9cef141b9266dff153 (patch) | |
tree | f31f2450103e30b65ce3f142b5c557564d1dbf89 /Source | |
parent | 3a1f2b2051e4b298259f016acea59673502dcad5 (diff) | |
parent | 6ebff6ebf8850a9372786bf56af8ee79dca6860d (diff) | |
download | CMake-93d813d87c9e54488e19ad9cef141b9266dff153.zip CMake-93d813d87c9e54488e19ad9cef141b9266dff153.tar.gz CMake-93d813d87c9e54488e19ad9cef141b9266dff153.tar.bz2 |
Merge topic 'vs-cuda-object-libs'
6ebff6ebf8 VS: Avoid unnecessary CUDA device linking for OBJECT libraries
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !8794
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmVisualStudio10TargetGenerator.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Source/cmVisualStudio10TargetGenerator.cxx b/Source/cmVisualStudio10TargetGenerator.cxx index 7ca23a3..96a01ad 100644 --- a/Source/cmVisualStudio10TargetGenerator.cxx +++ b/Source/cmVisualStudio10TargetGenerator.cxx @@ -3869,7 +3869,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; } |