summaryrefslogtreecommitdiffstats
path: root/Source/cmComputeLinkInformation.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-06-02 12:02:14 (GMT)
committerKitware Robot <kwrobot@kitware.com>2020-06-02 12:02:24 (GMT)
commita432b1075c8808c6e4c925d3f4d4ce94c5477bab (patch)
treecbf85da9bdbfdd82e2e0fa6d210478840f82b2da /Source/cmComputeLinkInformation.cxx
parentec7b5f21eef8bc0d6da729aa0f61ddccc7a06f3b (diff)
parent7ed8c9ebe33ccafc41ec9e096bf2884d617a0ebf (diff)
downloadCMake-a432b1075c8808c6e4c925d3f4d4ce94c5477bab.zip
CMake-a432b1075c8808c6e4c925d3f4d4ce94c5477bab.tar.gz
CMake-a432b1075c8808c6e4c925d3f4d4ce94c5477bab.tar.bz2
Merge topic 'getdef-expand'
7ed8c9ebe3 cmMakefile: add GetDefExpandList() that splits value into std::vector Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !4819
Diffstat (limited to 'Source/cmComputeLinkInformation.cxx')
-rw-r--r--Source/cmComputeLinkInformation.cxx33
1 files changed, 9 insertions, 24 deletions
diff --git a/Source/cmComputeLinkInformation.cxx b/Source/cmComputeLinkInformation.cxx
index c27e94f..4c5f57d 100644
--- a/Source/cmComputeLinkInformation.cxx
+++ b/Source/cmComputeLinkInformation.cxx
@@ -1331,18 +1331,13 @@ void cmComputeLinkInformation::ComputeFrameworkInfo()
std::vector<std::string> implicitDirVec;
// Get platform-wide implicit directories.
- if (const char* implicitLinks = this->Makefile->GetDefinition(
- "CMAKE_PLATFORM_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES")) {
- cmExpandList(implicitLinks, implicitDirVec);
- }
+ this->Makefile->GetDefExpandList(
+ "CMAKE_PLATFORM_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES", implicitDirVec);
// Get language-specific implicit directories.
std::string implicitDirVar = cmStrCat(
"CMAKE_", this->LinkLanguage, "_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES");
- if (const char* implicitDirs =
- this->Makefile->GetDefinition(implicitDirVar)) {
- cmExpandList(implicitDirs, implicitDirVec);
- }
+ this->Makefile->GetDefExpandList(implicitDirVar, implicitDirVec);
this->FrameworkPathsEmmitted.insert(implicitDirVec.begin(),
implicitDirVec.end());
@@ -1555,10 +1550,8 @@ void cmComputeLinkInformation::LoadImplicitLinkInfo()
std::vector<std::string> implicitDirVec;
// Get platform-wide implicit directories.
- if (const char* implicitLinks = (this->Makefile->GetDefinition(
- "CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES"))) {
- cmExpandList(implicitLinks, implicitDirVec);
- }
+ this->Makefile->GetDefExpandList("CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES",
+ implicitDirVec);
// Append library architecture to all implicit platform directories
// and add them to the set
@@ -1572,10 +1565,7 @@ void cmComputeLinkInformation::LoadImplicitLinkInfo()
// Get language-specific implicit directories.
std::string implicitDirVar =
cmStrCat("CMAKE_", this->LinkLanguage, "_IMPLICIT_LINK_DIRECTORIES");
- if (const char* implicitDirs =
- this->Makefile->GetDefinition(implicitDirVar)) {
- cmExpandList(implicitDirs, implicitDirVec);
- }
+ this->Makefile->GetDefExpandList(implicitDirVar, implicitDirVec);
// Store implicit link directories.
this->ImplicitLinkDirs.insert(implicitDirVec.begin(), implicitDirVec.end());
@@ -1584,10 +1574,7 @@ void cmComputeLinkInformation::LoadImplicitLinkInfo()
std::vector<std::string> implicitLibVec;
std::string implicitLibVar =
cmStrCat("CMAKE_", this->LinkLanguage, "_IMPLICIT_LINK_LIBRARIES");
- if (const char* implicitLibs =
- this->Makefile->GetDefinition(implicitLibVar)) {
- cmExpandList(implicitLibs, implicitLibVec);
- }
+ this->Makefile->GetDefExpandList(implicitLibVar, implicitLibVec);
// Store implicit link libraries.
for (std::string const& item : implicitLibVec) {
@@ -1599,10 +1586,8 @@ void cmComputeLinkInformation::LoadImplicitLinkInfo()
}
// Get platform specific rpath link directories
- if (const char* rpathDirs =
- (this->Makefile->GetDefinition("CMAKE_PLATFORM_RUNTIME_PATH"))) {
- cmExpandList(rpathDirs, this->RuntimeLinkDirs);
- }
+ this->Makefile->GetDefExpandList("CMAKE_PLATFORM_RUNTIME_PATH",
+ this->RuntimeLinkDirs);
}
std::vector<std::string> const&