diff options
author | Brad King <brad.king@kitware.com> | 2023-05-12 13:26:39 +0000 |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2023-05-12 09:26:56 -0400 |
commit | 4a1421efad46b4cbbb5b860f77dae44c9812b552 (patch) | |
tree | 2e27080ae8c5559258be1f798fcfbc83a8168866 /Source/cmLinkLineComputer.cxx | |
parent | 2b086065114049a7b5e18ead441b5b8ae6fc7ba0 (diff) | |
parent | ad9020a89922eff4b817ba6278d31a412cc17601 (diff) | |
download | cmake-4a1421efad46b4cbbb5b860f77dae44c9812b552.tar.gz |
Merge topic 'system-framework'
ad9020a899 Apple Frameworks: honor SYSTEM target property
Acked-by: Kitware Robot <kwrobot@kitware.com>
Tested-by: buildbot <buildbot@kitware.com>
Merge-request: !8469
Diffstat (limited to 'Source/cmLinkLineComputer.cxx')
-rw-r--r-- | Source/cmLinkLineComputer.cxx | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/Source/cmLinkLineComputer.cxx b/Source/cmLinkLineComputer.cxx index ba0c138ab9..b7ee4fa8a3 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; } |