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

Method AddPositionIndependentLinkAttribute

Source/cmGlobalXCodeGenerator.cxx:2532–2549  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2530}
2531
2532void cmGlobalXCodeGenerator::AddPositionIndependentLinkAttribute(
2533 cmGeneratorTarget* target, cmXCodeObject* buildSettings,
2534 std::string const& configName)
2535{
2536 // For now, only EXECUTABLE is concerned
2537 if (target->GetType() != cmStateEnums::EXECUTABLE) {
2538 return;
2539 }
2540
2541 char const* PICValue = target->GetLinkPIEProperty(configName);
2542 if (PICValue == nullptr) {
2543 // POSITION_INDEPENDENT_CODE is not set
2544 return;
2545 }
2546
2547 buildSettings->AddAttribute(
2548 "LD_NO_PIE", this->CreateString(cmIsOn(PICValue) ? "NO" : "YES"));
2549}
2550
2551void cmGlobalXCodeGenerator::CreateBuildSettings(cmGeneratorTarget* gtgt,
2552 cmXCodeObject* buildSettings,

Callers 1

CreateBuildSettingsMethod · 0.95

Calls 5

CreateStringMethod · 0.95
cmIsOnFunction · 0.85
GetLinkPIEPropertyMethod · 0.80
GetTypeMethod · 0.45
AddAttributeMethod · 0.45

Tested by

no test coverage detected