diff options
author | Vitaly Stakhovsky <vvs31415@gitlab.org> | 2020-05-30 12:00:00 (GMT) |
---|---|---|
committer | Vitaly Stakhovsky <vvs31415@gitlab.org> | 2020-05-30 12:59:20 (GMT) |
commit | 7ed8c9ebe33ccafc41ec9e096bf2884d617a0ebf (patch) | |
tree | b17167b762c3257baf362b515fbf1a8fece7b356 /Source/cmComputeLinkInformation.cxx | |
parent | 6bb20b51c9af40372b6a818826613e965cde5f19 (diff) | |
download | CMake-7ed8c9ebe33ccafc41ec9e096bf2884d617a0ebf.zip CMake-7ed8c9ebe33ccafc41ec9e096bf2884d617a0ebf.tar.gz CMake-7ed8c9ebe33ccafc41ec9e096bf2884d617a0ebf.tar.bz2 |
cmMakefile: add GetDefExpandList() that splits value into std::vector
Combines cmMakefile:GetDefinition() and cmExpandList()
Diffstat (limited to 'Source/cmComputeLinkInformation.cxx')
-rw-r--r-- | Source/cmComputeLinkInformation.cxx | 33 |
1 files changed, 9 insertions, 24 deletions
diff --git a/Source/cmComputeLinkInformation.cxx b/Source/cmComputeLinkInformation.cxx index 8723d08..0ea73d6 100644 --- a/Source/cmComputeLinkInformation.cxx +++ b/Source/cmComputeLinkInformation.cxx @@ -1330,18 +1330,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()); @@ -1554,10 +1549,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 @@ -1571,10 +1564,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()); @@ -1583,10 +1573,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) { @@ -1598,10 +1585,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& |