| 151 | } |
| 152 | |
| 153 | void cmMakefileLibraryTargetGenerator::WriteSharedLibraryRules(bool relink) |
| 154 | { |
| 155 | if (this->GeneratorTarget->IsFrameworkOnApple()) { |
| 156 | this->WriteFrameworkRules(relink); |
| 157 | return; |
| 158 | } |
| 159 | |
| 160 | if (!relink) { |
| 161 | bool const requiresDeviceLinking = requireDeviceLinking( |
| 162 | *this->GeneratorTarget, *this->LocalGenerator, this->GetConfigName()); |
| 163 | if (requiresDeviceLinking) { |
| 164 | this->WriteDeviceLibraryRules("CMAKE_CUDA_DEVICE_LINK_LIBRARY", relink); |
| 165 | } |
| 166 | } |
| 167 | |
| 168 | std::string linkLanguage = |
| 169 | this->GeneratorTarget->GetLinkerLanguage(this->GetConfigName()); |
| 170 | std::string linkRuleVar = |
| 171 | cmStrCat("CMAKE_", linkLanguage, "_CREATE_SHARED_LIBRARY"); |
| 172 | |
| 173 | if (this->GeneratorTarget->IsArchivedAIXSharedLibrary()) { |
| 174 | linkRuleVar = |
| 175 | cmStrCat("CMAKE_", linkLanguage, "_CREATE_SHARED_LIBRARY_ARCHIVE"); |
| 176 | } |
| 177 | |
| 178 | std::string extraFlags; |
| 179 | this->LocalGenerator->AppendTargetCreationLinkFlags( |
| 180 | extraFlags, this->GeneratorTarget, linkLanguage); |
| 181 | this->LocalGenerator->AddTargetTypeLinkerFlags( |
| 182 | extraFlags, this->GeneratorTarget, linkLanguage, this->GetConfigName()); |
| 183 | this->LocalGenerator->AddPerLanguageLinkFlags( |
| 184 | extraFlags, this->GeneratorTarget, linkLanguage, this->GetConfigName()); |
| 185 | |
| 186 | std::unique_ptr<cmLinkLineComputer> linkLineComputer = |
| 187 | this->CreateLinkLineComputer( |
| 188 | this->LocalGenerator, |
| 189 | this->LocalGenerator->GetStateSnapshot().GetDirectory()); |
| 190 | |
| 191 | this->LocalGenerator->AppendModuleDefinitionFlag( |
| 192 | extraFlags, this->GeneratorTarget, linkLineComputer.get(), |
| 193 | this->GetConfigName(), linkLanguage); |
| 194 | |
| 195 | this->UseLWYU = this->LocalGenerator->AppendLWYUFlags( |
| 196 | extraFlags, this->GeneratorTarget, linkLanguage); |
| 197 | |
| 198 | this->GetTargetLinkFlags(extraFlags, linkLanguage); |
| 199 | |
| 200 | this->WriteLibraryRules(linkRuleVar, extraFlags, relink); |
| 201 | } |
| 202 | |
| 203 | void cmMakefileLibraryTargetGenerator::WriteModuleLibraryRules(bool relink) |
| 204 | { |
no test coverage detected