summaryrefslogtreecommitdiffstats
path: root/Source/cmSearchPath.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmSearchPath.cxx')
-rw-r--r--Source/cmSearchPath.cxx6
1 files changed, 2 insertions, 4 deletions
diff --git a/Source/cmSearchPath.cxx b/Source/cmSearchPath.cxx
index affff54..d15ce57 100644
--- a/Source/cmSearchPath.cxx
+++ b/Source/cmSearchPath.cxx
@@ -78,8 +78,7 @@ void cmSearchPath::AddCMakePath(const std::string& variable)
// Get a path from a CMake variable.
if (const char* value = this->FC->Makefile->GetDefinition(variable)) {
- std::vector<std::string> expanded;
- cmExpandList(value, expanded);
+ std::vector<std::string> expanded = cmExpandedList(value);
for (std::string const& p : expanded) {
this->AddPathInternal(
@@ -103,8 +102,7 @@ void cmSearchPath::AddCMakePrefixPath(const std::string& variable)
// Get a path from a CMake variable.
if (const char* value = this->FC->Makefile->GetDefinition(variable)) {
- std::vector<std::string> expanded;
- cmExpandList(value, expanded);
+ std::vector<std::string> expanded = cmExpandedList(value);
this->AddPrefixPaths(
expanded, this->FC->Makefile->GetCurrentSourceDirectory().c_str());