| 201 | } |
| 202 | |
| 203 | void cmMakefileLibraryTargetGenerator::WriteModuleLibraryRules(bool relink) |
| 204 | { |
| 205 | if (!relink) { |
| 206 | bool const requiresDeviceLinking = requireDeviceLinking( |
| 207 | *this->GeneratorTarget, *this->LocalGenerator, this->GetConfigName()); |
| 208 | if (requiresDeviceLinking) { |
| 209 | this->WriteDeviceLibraryRules("CMAKE_CUDA_DEVICE_LINK_LIBRARY", relink); |
| 210 | } |
| 211 | } |
| 212 | |
| 213 | std::string linkLanguage = |
| 214 | this->GeneratorTarget->GetLinkerLanguage(this->GetConfigName()); |
| 215 | std::string linkRuleVar = |
| 216 | cmStrCat("CMAKE_", linkLanguage, "_CREATE_SHARED_MODULE"); |
| 217 | |
| 218 | std::string extraFlags; |
| 219 | this->LocalGenerator->AppendTargetCreationLinkFlags( |
| 220 | extraFlags, this->GeneratorTarget, linkLanguage); |
| 221 | this->LocalGenerator->AddTargetTypeLinkerFlags( |
| 222 | extraFlags, this->GeneratorTarget, linkLanguage, this->GetConfigName()); |
| 223 | this->LocalGenerator->AddPerLanguageLinkFlags( |
| 224 | extraFlags, this->GeneratorTarget, linkLanguage, this->GetConfigName()); |
| 225 | |
| 226 | std::unique_ptr<cmLinkLineComputer> linkLineComputer = |
| 227 | this->CreateLinkLineComputer( |
| 228 | this->LocalGenerator, |
| 229 | this->LocalGenerator->GetStateSnapshot().GetDirectory()); |
| 230 | |
| 231 | this->LocalGenerator->AppendModuleDefinitionFlag( |
| 232 | extraFlags, this->GeneratorTarget, linkLineComputer.get(), |
| 233 | this->GetConfigName(), linkLanguage); |
| 234 | |
| 235 | this->UseLWYU = this->LocalGenerator->AppendLWYUFlags( |
| 236 | extraFlags, this->GeneratorTarget, linkLanguage); |
| 237 | |
| 238 | this->GetTargetLinkFlags(extraFlags, linkLanguage); |
| 239 | |
| 240 | this->WriteLibraryRules(linkRuleVar, extraFlags, relink); |
| 241 | } |
| 242 | |
| 243 | void cmMakefileLibraryTargetGenerator::WriteFrameworkRules(bool relink) |
| 244 | { |
no test coverage detected