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

Method GetXcFrameworkFlags

Source/cmLocalGenerator.cxx:1782–1817  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1780}
1781
1782std::string cmLocalGenerator::GetXcFrameworkFlags(std::string const& lang,
1783 std::string const& config,
1784 cmGeneratorTarget* target)
1785{
1786 cmLocalGenerator* lg = target->GetLocalGenerator();
1787 cmMakefile* mf = lg->GetMakefile();
1788
1789 if (!target->IsApple()) {
1790 return std::string();
1791 }
1792
1793 cmValue includeSearchFlag =
1794 mf->GetDefinition(cmStrCat("CMAKE_INCLUDE_FLAG_", lang));
1795 cmValue sysIncludeSearchFlag =
1796 mf->GetDefinition(cmStrCat("CMAKE_INCLUDE_SYSTEM_FLAG_", lang));
1797
1798 if (!includeSearchFlag && !sysIncludeSearchFlag) {
1799 return std::string{};
1800 }
1801
1802 std::string flags;
1803 if (cmComputeLinkInformation* cli = target->GetLinkInformation(config)) {
1804 std::vector<std::string> const& paths = cli->GetXcFrameworkHeaderPaths();
1805 for (std::string const& path : paths) {
1806 if (sysIncludeSearchFlag &&
1807 target->IsSystemIncludeDirectory(path, config, lang)) {
1808 flags += *sysIncludeSearchFlag;
1809 } else {
1810 flags += *includeSearchFlag;
1811 }
1812 flags += lg->ConvertToOutputFormat(path, cmOutputConverter::SHELL);
1813 flags += " ";
1814 }
1815 }
1816 return flags;
1817}
1818
1819void cmLocalGenerator::GetTargetDefines(cmGeneratorTarget const* target,
1820 std::string const& config,

Callers 1

GetTargetCompileFlagsMethod · 0.95

Calls 8

GetLinkInformationMethod · 0.80
cmStrCatFunction · 0.70
GetLocalGeneratorMethod · 0.45
GetMakefileMethod · 0.45
IsAppleMethod · 0.45
GetDefinitionMethod · 0.45
ConvertToOutputFormatMethod · 0.45

Tested by

no test coverage detected