summaryrefslogtreecommitdiff
path: root/Source/cmStateSnapshot.cxx
diff options
context:
space:
mode:
authorDongHun Kwak <dh0128.kwak@samsung.com>2021-10-08 09:20:25 +0900
committerDongHun Kwak <dh0128.kwak@samsung.com>2021-10-08 09:20:25 +0900
commit50e508f0913d5580aa156327527da3d29a66b90c (patch)
treed581ffbad59a2becc33bc79e75e504de500a8e93 /Source/cmStateSnapshot.cxx
parent37869418c616f7e57c34b9287c4c8f3671df20de (diff)
downloadcmake-50e508f0913d5580aa156327527da3d29a66b90c.tar.gz
cmake-50e508f0913d5580aa156327527da3d29a66b90c.tar.bz2
cmake-50e508f0913d5580aa156327527da3d29a66b90c.zip
Imported Upstream version 3.19.0upstream/3.19.0
Diffstat (limited to 'Source/cmStateSnapshot.cxx')
-rw-r--r--Source/cmStateSnapshot.cxx14
1 files changed, 4 insertions, 10 deletions
diff --git a/Source/cmStateSnapshot.cxx b/Source/cmStateSnapshot.cxx
index c22343185..1e20abb25 100644
--- a/Source/cmStateSnapshot.cxx
+++ b/Source/cmStateSnapshot.cxx
@@ -53,7 +53,7 @@ void cmStateSnapshot::SetListFile(const std::string& listfile)
*this->Position->ExecutionListFile = listfile;
}
-std::string cmStateSnapshot::GetExecutionListFile() const
+std::string const& cmStateSnapshot::GetExecutionListFile() const
{
return *this->Position->ExecutionListFile;
}
@@ -148,7 +148,7 @@ bool cmStateSnapshot::PopPolicy()
bool cmStateSnapshot::CanPopPolicyScope()
{
- return this->Position->Policies == this->Position->PolicyScope;
+ return this->Position->Policies != this->Position->PolicyScope;
}
void cmStateSnapshot::SetPolicy(cmPolicies::PolicyID id,
@@ -232,11 +232,6 @@ void cmStateSnapshot::RemoveDefinition(std::string const& name)
this->Position->Vars->Unset(name);
}
-std::vector<std::string> cmStateSnapshot::UnusedKeys() const
-{
- return this->Position->Vars->UnusedKeys();
-}
-
std::vector<std::string> cmStateSnapshot::ClosureKeys() const
{
return cmDefinitions::ClosureKeys(this->Position->Vars,
@@ -328,7 +323,7 @@ void cmStateSnapshot::SetDefaultDefinitions()
#if defined(__CYGWIN__)
std::string legacy;
if (cmSystemTools::GetEnv("CMAKE_LEGACY_CYGWIN_WIN32", legacy) &&
- cmIsOn(legacy.c_str())) {
+ cmIsOn(legacy)) {
this->SetDefinition("WIN32", "1");
this->SetDefinition("CMAKE_HOST_WIN32", "1");
}
@@ -416,8 +411,7 @@ void cmStateSnapshot::InitializeFromParent()
parent->BuildSystemDirectory->Properties.GetPropertyValue(
"INCLUDE_REGULAR_EXPRESSION");
this->Position->BuildSystemDirectory->Properties.SetProperty(
- "INCLUDE_REGULAR_EXPRESSION",
- include_regex ? include_regex->c_str() : nullptr);
+ "INCLUDE_REGULAR_EXPRESSION", cmToCStr(include_regex));
}
cmState* cmStateSnapshot::GetState() const