MCPcopy Create free account
hub / github.com/Kitware/CMake / AppendIPOLinkerFlags

Method AppendIPOLinkerFlags

Source/cmLocalGenerator.cxx:3553–3581  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3551}
3552
3553void cmLocalGenerator::AppendIPOLinkerFlags(std::string& flags,
3554 cmGeneratorTarget* target,
3555 std::string const& config,
3556 std::string const& lang)
3557{
3558 if (!target->IsIPOEnabled(lang, config)) {
3559 return;
3560 }
3561
3562 switch (target->GetType()) {
3563 case cmStateEnums::EXECUTABLE:
3564 case cmStateEnums::SHARED_LIBRARY:
3565 case cmStateEnums::MODULE_LIBRARY:
3566 break;
3567 default:
3568 return;
3569 }
3570
3571 std::string const name = "CMAKE_" + lang + "_LINK_OPTIONS_IPO";
3572 cmValue rawFlagsList = this->Makefile->GetDefinition(name);
3573 if (!rawFlagsList) {
3574 return;
3575 }
3576
3577 cmList flagsList{ *rawFlagsList };
3578 for (std::string const& o : flagsList) {
3579 this->AppendFlagEscape(flags, o);
3580 }
3581}
3582
3583void cmLocalGenerator::AppendPositionIndependentLinkerFlags(
3584 std::string& flags, cmGeneratorTarget* target, std::string const& config,

Callers 3

GetTargetFlagsMethod · 0.95
WriteExecutableRuleMethod · 0.80
WriteLibraryRulesMethod · 0.80

Calls 4

AppendFlagEscapeMethod · 0.95
IsIPOEnabledMethod · 0.80
GetTypeMethod · 0.45
GetDefinitionMethod · 0.45

Tested by

no test coverage detected