diff options
author | Vitaly Stakhovsky <vvs31415@gitlab.org> | 2020-03-22 07:00:00 (GMT) |
---|---|---|
committer | Vitaly Stakhovsky <vvs31415@gitlab.org> | 2020-03-25 13:10:46 (GMT) |
commit | c84cf42897e4d95706d4f750c2ad085c84a259f2 (patch) | |
tree | 980169e295b16dbc56fe3577b48913fd4a9c2e8a /Source/cmFindPackageCommand.cxx | |
parent | d13d5c11cf8b5878c5e63b067e73a2175f01d93f (diff) | |
download | CMake-c84cf42897e4d95706d4f750c2ad085c84a259f2.zip CMake-c84cf42897e4d95706d4f750c2ad085c84a259f2.tar.gz CMake-c84cf42897e4d95706d4f750c2ad085c84a259f2.tar.bz2 |
cmState::GetGlobalProperty: return cmProp
Diffstat (limited to 'Source/cmFindPackageCommand.cxx')
-rw-r--r-- | Source/cmFindPackageCommand.cxx | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/Source/cmFindPackageCommand.cxx b/Source/cmFindPackageCommand.cxx index f606002..e996327 100644 --- a/Source/cmFindPackageCommand.cxx +++ b/Source/cmFindPackageCommand.cxx @@ -1114,12 +1114,10 @@ bool cmFindPackageCommand::ReadListFile(const std::string& f, void cmFindPackageCommand::AppendToFoundProperty(bool found) { std::vector<std::string> foundContents; - const char* foundProp = + cmProp foundProp = this->Makefile->GetState()->GetGlobalProperty("PACKAGES_FOUND"); - if (foundProp && *foundProp) { - std::string tmp = foundProp; - - cmExpandList(tmp, foundContents, false); + if (foundProp && !foundProp->empty()) { + cmExpandList(*foundProp, foundContents, false); auto nameIt = std::find(foundContents.begin(), foundContents.end(), this->Name); if (nameIt != foundContents.end()) { @@ -1128,12 +1126,10 @@ void cmFindPackageCommand::AppendToFoundProperty(bool found) } std::vector<std::string> notFoundContents; - const char* notFoundProp = + cmProp notFoundProp = this->Makefile->GetState()->GetGlobalProperty("PACKAGES_NOT_FOUND"); - if (notFoundProp && *notFoundProp) { - std::string tmp = notFoundProp; - - cmExpandList(tmp, notFoundContents, false); + if (notFoundProp && !notFoundProp->empty()) { + cmExpandList(*notFoundProp, notFoundContents, false); auto nameIt = std::find(notFoundContents.begin(), notFoundContents.end(), this->Name); if (nameIt != notFoundContents.end()) { |