summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2023-09-22 13:06:27 (GMT)
committerKitware Robot <kwrobot@kitware.com>2023-09-22 13:07:11 (GMT)
commit2dafd1f09227915197eb268cac6affdb37a24647 (patch)
tree5294dcb92f8fa8b90d5f378e1d6e2650f5170ff5 /Source
parentaf888a07f8e3ab7d6a736b5a5a129a1d808474e5 (diff)
parent3bdf95f942c8532fb1e0fbad52f04f46e822b2f9 (diff)
downloadCMake-2dafd1f09227915197eb268cac6affdb37a24647.zip
CMake-2dafd1f09227915197eb268cac6affdb37a24647.tar.gz
CMake-2dafd1f09227915197eb268cac6affdb37a24647.tar.bz2
Merge topic 'macOS-system-framework-link'
3bdf95f942 macOS: GNU toolchain: ensure framework, marked as SYSTEM, can be linked Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !8825
Diffstat (limited to 'Source')
-rw-r--r--Source/cmLinkLineComputer.cxx18
-rw-r--r--Source/cmLinkLineComputer.h3
-rw-r--r--Source/cmLocalGenerator.cxx5
3 files changed, 7 insertions, 19 deletions
diff --git a/Source/cmLinkLineComputer.cxx b/Source/cmLinkLineComputer.cxx
index 1f5005b..a29e33f 100644
--- a/Source/cmLinkLineComputer.cxx
+++ b/Source/cmLinkLineComputer.cxx
@@ -192,24 +192,16 @@ std::string cmLinkLineComputer::ComputeRPath(cmComputeLinkInformation& cli)
}
std::string cmLinkLineComputer::ComputeFrameworkPath(
- cmComputeLinkInformation& cli, cmValue fwSearchFlag, cmValue sysFwSearchFlag)
+ cmComputeLinkInformation& cli, cmValue fwSearchFlag)
{
- if (!fwSearchFlag && !sysFwSearchFlag) {
+ if (!fwSearchFlag) {
return std::string{};
}
std::string frameworkPath;
- 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 += " ";
+ for (auto const& fd : cli.GetFrameworkPaths()) {
+ frameworkPath +=
+ cmStrCat(fwSearchFlag, this->ConvertToOutputFormat(fd), ' ');
}
return frameworkPath;
}
diff --git a/Source/cmLinkLineComputer.h b/Source/cmLinkLineComputer.h
index 4e285f2..afd3944 100644
--- a/Source/cmLinkLineComputer.h
+++ b/Source/cmLinkLineComputer.h
@@ -44,8 +44,7 @@ public:
std::vector<BT<std::string>>& linkPath);
std::string ComputeFrameworkPath(cmComputeLinkInformation& cli,
- cmValue fwSearchFlag,
- cmValue sysFwSearchFlag);
+ cmValue fwSearchFlag);
std::string ComputeLinkLibraries(cmComputeLinkInformation& cli,
std::string const& stdLibString);
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index 63c8aa8..f1fe7df 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -1850,11 +1850,8 @@ void cmLocalGenerator::OutputLinkLibraries(
// Append the framework search path flags.
cmValue fwSearchFlag = this->Makefile->GetDefinition(
cmStrCat("CMAKE_", linkLanguage, "_FRAMEWORK_SEARCH_FLAG"));
- cmValue sysFwSearchFlag = this->Makefile->GetDefinition(
- cmStrCat("CMAKE_", linkLanguage, "_SYSTEM_FRAMEWORK_SEARCH_FLAG"));
- frameworkPath =
- linkLineComputer->ComputeFrameworkPath(cli, fwSearchFlag, sysFwSearchFlag);
+ frameworkPath = linkLineComputer->ComputeFrameworkPath(cli, fwSearchFlag);
linkLineComputer->ComputeLinkPath(cli, libPathFlag, libPathTerminator,
linkPath);
linkLineComputer->ComputeLinkLibraries(cli, stdLibString, linkLibraries);