| 2530 | } |
| 2531 | |
| 2532 | void 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 | |
| 2551 | void cmGlobalXCodeGenerator::CreateBuildSettings(cmGeneratorTarget* gtgt, |
| 2552 | cmXCodeObject* buildSettings, |
no test coverage detected