summaryrefslogtreecommitdiffstats
path: root/Source/cmLinkLineComputer.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmLinkLineComputer.cxx')
-rw-r--r--Source/cmLinkLineComputer.cxx20
1 files changed, 14 insertions, 6 deletions
diff --git a/Source/cmLinkLineComputer.cxx b/Source/cmLinkLineComputer.cxx
index ba0c138..b7ee4fa 100644
--- a/Source/cmLinkLineComputer.cxx
+++ b/Source/cmLinkLineComputer.cxx
@@ -191,16 +191,24 @@ std::string cmLinkLineComputer::ComputeRPath(cmComputeLinkInformation& cli)
}
std::string cmLinkLineComputer::ComputeFrameworkPath(
- cmComputeLinkInformation& cli, std::string const& fwSearchFlag)
+ cmComputeLinkInformation& cli, cmValue fwSearchFlag, cmValue sysFwSearchFlag)
{
+ if (!fwSearchFlag && !sysFwSearchFlag) {
+ return std::string{};
+ }
+
std::string frameworkPath;
- if (!fwSearchFlag.empty()) {
- std::vector<std::string> const& fwDirs = cli.GetFrameworkPaths();
- for (std::string const& fd : fwDirs) {
+ auto const& fwDirs = cli.GetFrameworkPaths();
+ for (auto const& fd : fwDirs) {
+ if (sysFwSearchFlag &&
+ cli.GetTarget()->IsSystemIncludeDirectory(fd, cli.GetConfig(),
+ cli.GetLinkLanguage())) {
+ frameworkPath += sysFwSearchFlag;
+ } else {
frameworkPath += fwSearchFlag;
- frameworkPath += this->ConvertToOutputFormat(fd);
- frameworkPath += " ";
}
+ frameworkPath += this->ConvertToOutputFormat(fd);
+ frameworkPath += " ";
}
return frameworkPath;
}