diff options
author | Vitaly Stakhovsky <vvs31415@gitlab.org> | 2018-09-06 00:08:17 (GMT) |
---|---|---|
committer | Vitaly Stakhovsky <vvs31415@gitlab.org> | 2018-09-06 00:08:17 (GMT) |
commit | 437d0c16c72a45da8c81919f953859f5af71b19b (patch) | |
tree | 2a456a93a0eddf55d46313bd6d1bfbe668324d22 /Source/cmStateSnapshot.cxx | |
parent | b0f769ad2da5162f7f65e13061b18b4538f06d9a (diff) | |
download | CMake-437d0c16c72a45da8c81919f953859f5af71b19b.zip CMake-437d0c16c72a45da8c81919f953859f5af71b19b.tar.gz CMake-437d0c16c72a45da8c81919f953859f5af71b19b.tar.bz2 |
cmStateSnapshot::GetDefinition(): Return std::string const*
Expose std::string type used internally in cmDefinitions instead of const char*
Diffstat (limited to 'Source/cmStateSnapshot.cxx')
-rw-r--r-- | Source/cmStateSnapshot.cxx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Source/cmStateSnapshot.cxx b/Source/cmStateSnapshot.cxx index ec428a6..0379e7e 100644 --- a/Source/cmStateSnapshot.cxx +++ b/Source/cmStateSnapshot.cxx @@ -204,7 +204,8 @@ bool cmStateSnapshot::HasDefinedPolicyCMP0011() return !this->Position->Policies->IsEmpty(); } -const char* cmStateSnapshot::GetDefinition(std::string const& name) const +std::string const* cmStateSnapshot::GetDefinition( + std::string const& name) const { assert(this->Position->Vars.IsValid()); return cmDefinitions::Get(name, this->Position->Vars, this->Position->Root); @@ -426,8 +427,8 @@ std::string cmStateSnapshot::GetProjectName() const void cmStateSnapshot::InitializeFromParent_ForSubdirsCommand() { - std::string currentSrcDir = this->GetDefinition("CMAKE_CURRENT_SOURCE_DIR"); - std::string currentBinDir = this->GetDefinition("CMAKE_CURRENT_BINARY_DIR"); + std::string currentSrcDir = *this->GetDefinition("CMAKE_CURRENT_SOURCE_DIR"); + std::string currentBinDir = *this->GetDefinition("CMAKE_CURRENT_BINARY_DIR"); this->InitializeFromParent(); this->SetDefinition("CMAKE_SOURCE_DIR", this->State->GetSourceDirectory()); this->SetDefinition("CMAKE_BINARY_DIR", this->State->GetBinaryDirectory()); |