diff options
Diffstat (limited to 'Source/cmSearchPath.cxx')
-rw-r--r-- | Source/cmSearchPath.cxx | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/Source/cmSearchPath.cxx b/Source/cmSearchPath.cxx index eb8fcaf..a58be62 100644 --- a/Source/cmSearchPath.cxx +++ b/Source/cmSearchPath.cxx @@ -8,6 +8,7 @@ #include "cmFindCommon.h" #include "cmMakefile.h" +#include "cmProperty.h" #include "cmStringAlgorithms.h" #include "cmSystemTools.h" @@ -77,8 +78,8 @@ void cmSearchPath::AddCMakePath(const std::string& variable) assert(this->FC != nullptr); // Get a path from a CMake variable. - if (const char* value = this->FC->Makefile->GetDefinition(variable)) { - std::vector<std::string> expanded = cmExpandedList(value); + if (cmProp value = this->FC->Makefile->GetDefinition(variable)) { + std::vector<std::string> expanded = cmExpandedList(*value); for (std::string const& p : expanded) { this->AddPathInternal( @@ -101,8 +102,8 @@ void cmSearchPath::AddCMakePrefixPath(const std::string& variable) assert(this->FC != nullptr); // Get a path from a CMake variable. - if (const char* value = this->FC->Makefile->GetDefinition(variable)) { - std::vector<std::string> expanded = cmExpandedList(value); + if (cmProp value = this->FC->Makefile->GetDefinition(variable)) { + std::vector<std::string> expanded = cmExpandedList(*value); this->AddPrefixPaths( expanded, this->FC->Makefile->GetCurrentSourceDirectory().c_str()); @@ -178,15 +179,15 @@ void cmSearchPath::AddPrefixPaths(const std::vector<std::string>& paths, dir += "/"; } if (subdir == "include" || subdir == "lib") { - const char* arch = + cmProp arch = this->FC->Makefile->GetDefinition("CMAKE_LIBRARY_ARCHITECTURE"); if (cmNonempty(arch)) { if (this->FC->Makefile->IsDefinitionSet("CMAKE_SYSROOT") && this->FC->Makefile->IsDefinitionSet( "CMAKE_PREFIX_LIBRARY_ARCHITECTURE")) { - this->AddPathInternal(cmStrCat('/', arch, dir, subdir), base); + this->AddPathInternal(cmStrCat('/', *arch, dir, subdir), base); } else { - this->AddPathInternal(cmStrCat(dir, subdir, '/', arch), base); + this->AddPathInternal(cmStrCat(dir, subdir, '/', *arch), base); } } } |