diff options
author | Marc Chevrier <marc.chevrier@gmail.com> | 2020-04-06 09:22:37 (GMT) |
---|---|---|
committer | Marc Chevrier <marc.chevrier@gmail.com> | 2020-04-19 13:53:11 (GMT) |
commit | 4248bb452a5886ec4b632e2d602fcaafd2b13aaf (patch) | |
tree | b7e126570036c7a7ec0ac61ca7ef99f67edd6d18 /Source/cmMakefileTargetGenerator.cxx | |
parent | ec48e023f6261371aa5d0e46ebf9c163e40c9b40 (diff) | |
download | CMake-4248bb452a5886ec4b632e2d602fcaafd2b13aaf.zip CMake-4248bb452a5886ec4b632e2d602fcaafd2b13aaf.tar.gz CMake-4248bb452a5886ec4b632e2d602fcaafd2b13aaf.tar.bz2 |
CUDA: Device linking use now link options
properties LINK_OPTIONS and INTERFACE_LINK_OPTIONS are propagated
to the device link step.
To control which options are selected for normal link and device link steps,
the $<DEVICE_LINK> and $<HOST_LINK> generator expressions can be used.
Fixes: #18265
Diffstat (limited to 'Source/cmMakefileTargetGenerator.cxx')
-rw-r--r-- | Source/cmMakefileTargetGenerator.cxx | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Source/cmMakefileTargetGenerator.cxx b/Source/cmMakefileTargetGenerator.cxx index ee87044..b21946c 100644 --- a/Source/cmMakefileTargetGenerator.cxx +++ b/Source/cmMakefileTargetGenerator.cxx @@ -87,6 +87,18 @@ std::string cmMakefileTargetGenerator::GetConfigName() return configNames.front(); } +void cmMakefileTargetGenerator::GetDeviceLinkFlags( + std::string& linkFlags, const std::string& linkLanguage) +{ + cmGeneratorTarget::DeviceLinkSetter setter(*this->GetGeneratorTarget()); + + std::vector<std::string> linkOpts; + this->GeneratorTarget->GetLinkOptions(linkOpts, this->GetConfigName(), + linkLanguage); + // LINK_OPTIONS are escaped. + this->LocalGenerator->AppendCompileOptions(linkFlags, linkOpts); +} + void cmMakefileTargetGenerator::GetTargetLinkFlags( std::string& flags, const std::string& linkLanguage) { |