| 2483 | } |
| 2484 | |
| 2485 | void cmLocalGenerator::AddPositionIndependentFlags(std::string& flags, |
| 2486 | std::string const& lang, |
| 2487 | int targetType) |
| 2488 | { |
| 2489 | std::string picFlags; |
| 2490 | |
| 2491 | if (targetType == cmStateEnums::EXECUTABLE) { |
| 2492 | picFlags = this->Makefile->GetSafeDefinition( |
| 2493 | cmStrCat("CMAKE_", lang, "_COMPILE_OPTIONS_PIE")); |
| 2494 | } |
| 2495 | if (picFlags.empty()) { |
| 2496 | picFlags = this->Makefile->GetSafeDefinition( |
| 2497 | cmStrCat("CMAKE_", lang, "_COMPILE_OPTIONS_PIC")); |
| 2498 | } |
| 2499 | if (!picFlags.empty()) { |
| 2500 | cmList options{ picFlags }; |
| 2501 | for (std::string const& o : options) { |
| 2502 | this->AppendFlagEscape(flags, o); |
| 2503 | } |
| 2504 | } |
| 2505 | } |
| 2506 | |
| 2507 | void cmLocalGenerator::AddColorDiagnosticsFlags(std::string& flags, |
| 2508 | std::string const& lang) |
no test coverage detected