summaryrefslogtreecommitdiffstats
path: root/Source/CPack/cpack.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-04-18 14:36:48 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-04-20 22:21:53 (GMT)
commitf3af9517ff6152a9e1548d73404ce64991855482 (patch)
tree4e8e094f3ce68887b1265f99f6c84a8bf33860c4 /Source/CPack/cpack.cxx
parentf438cd373131b85dd71b1f902c56fb3584cf8f87 (diff)
downloadCMake-f3af9517ff6152a9e1548d73404ce64991855482.zip
CMake-f3af9517ff6152a9e1548d73404ce64991855482.tar.gz
CMake-f3af9517ff6152a9e1548d73404ce64991855482.tar.bz2
CPack: Don't copy cmMakefile. Just push a scope instead.
Diffstat (limited to 'Source/CPack/cpack.cxx')
-rw-r--r--Source/CPack/cpack.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/CPack/cpack.cxx b/Source/CPack/cpack.cxx
index 2752270..2207873 100644
--- a/Source/CPack/cpack.cxx
+++ b/Source/CPack/cpack.cxx
@@ -356,8 +356,8 @@ int main (int argc, char const* const* argv)
++it )
{
const char* gen = it->c_str();
- cmMakefile newMF(*globalMF);
- cmMakefile* mf = &newMF;
+ cmMakefile::ScopePushPop raii(globalMF);
+ cmMakefile* mf = globalMF;
cmCPack_Log(&log, cmCPackLog::LOG_VERBOSE,
"Specified generator: " << gen << std::endl);
if ( parsed && !mf->GetDefinition("CPACK_PACKAGE_NAME") )