MCPcopy Create free account
hub / github.com/Kitware/CMake / PushListFileVars

Method PushListFileVars

Source/cmMakefile.cxx:113–128  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

111 {
112 }
113 void PushListFileVars(std::string const& newCurrent)
114 {
115 if (cmValue p = this->Makefile->GetDefinition(kCMAKE_PARENT_LIST_FILE)) {
116 this->OldParent = *p;
117 }
118 if (cmValue c = this->Makefile->GetDefinition(kCMAKE_CURRENT_LIST_FILE)) {
119 this->OldCurrent = *c;
120 this->Makefile->AddDefinition(kCMAKE_PARENT_LIST_FILE, this->OldCurrent);
121 this->Makefile->MarkVariableAsUsed(kCMAKE_PARENT_LIST_FILE);
122 }
123 this->Makefile->AddDefinition(kCMAKE_CURRENT_LIST_FILE, newCurrent);
124 this->Makefile->AddDefinition(kCMAKE_CURRENT_LIST_DIR,
125 cmSystemTools::GetFilenamePath(newCurrent));
126 this->Makefile->MarkVariableAsUsed(kCMAKE_CURRENT_LIST_FILE);
127 this->Makefile->MarkVariableAsUsed(kCMAKE_CURRENT_LIST_DIR);
128 }
129 void PopListFileVars()
130 {
131 if (this->OldParent) {

Callers 3

IncludeScopeMethod · 0.80
ListFileScopeMethod · 0.80
BuildsystemFileScopeMethod · 0.80

Calls 3

MarkVariableAsUsedMethod · 0.80
GetDefinitionMethod · 0.45
AddDefinitionMethod · 0.45

Tested by

no test coverage detected