From f3af9517ff6152a9e1548d73404ce64991855482 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Sat, 18 Apr 2015 16:36:48 +0200 Subject: CPack: Don't copy cmMakefile. Just push a scope instead. --- Source/CPack/cpack.cxx | 4 ++-- 1 file 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") ) -- cgit v0.12