cmLocalGenerator: Use ScopePushPop RAII class to manage local variable scopes

This commit is contained in:
Brad King 2015-11-24 13:11:09 -05:00
parent d85c9176ae
commit 0fa7f143a0
1 changed files with 2 additions and 4 deletions

View File

@ -3003,7 +3003,7 @@ void cmLocalGenerator::GenerateAppleInfoPList(cmTarget* target,
// override user make variables. If not the configuration will fall
// back to the directory-level values set by the user.
cmMakefile* mf = this->Makefile;
mf->PushScope();
cmMakefile::ScopePushPop varScope(mf);
mf->AddDefinition("MACOSX_BUNDLE_EXECUTABLE_NAME", targetName.c_str());
cmLGInfoProp(mf, target, "MACOSX_BUNDLE_INFO_STRING");
cmLGInfoProp(mf, target, "MACOSX_BUNDLE_ICON_FILE");
@ -3014,7 +3014,6 @@ void cmLocalGenerator::GenerateAppleInfoPList(cmTarget* target,
cmLGInfoProp(mf, target, "MACOSX_BUNDLE_BUNDLE_VERSION");
cmLGInfoProp(mf, target, "MACOSX_BUNDLE_COPYRIGHT");
mf->ConfigureFile(inFile.c_str(), fname, false, false, false);
mf->PopScope();
}
//----------------------------------------------------------------------------
@ -3047,12 +3046,11 @@ void cmLocalGenerator::GenerateFrameworkInfoPList(cmTarget* target,
// override user make variables. If not the configuration will fall
// back to the directory-level values set by the user.
cmMakefile* mf = this->Makefile;
mf->PushScope();
cmMakefile::ScopePushPop varScope(mf);
mf->AddDefinition("MACOSX_FRAMEWORK_NAME", targetName.c_str());
cmLGInfoProp(mf, target, "MACOSX_FRAMEWORK_ICON_FILE");
cmLGInfoProp(mf, target, "MACOSX_FRAMEWORK_IDENTIFIER");
cmLGInfoProp(mf, target, "MACOSX_FRAMEWORK_SHORT_VERSION_STRING");
cmLGInfoProp(mf, target, "MACOSX_FRAMEWORK_BUNDLE_VERSION");
mf->ConfigureFile(inFile.c_str(), fname, false, false, false);
mf->PopScope();
}