From 297c63fa65327491a2b50e521b661c5835a19fe4 Mon Sep 17 00:00:00 2001 From: Anas Nashif Date: Tue, 13 Aug 2013 07:48:01 -0400 Subject: Imported Upstream version 2.8.11.2 --- Source/CPack/cpack.cxx | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'Source/CPack/cpack.cxx') diff --git a/Source/CPack/cpack.cxx b/Source/CPack/cpack.cxx index b6035854e..b18891858 100644 --- a/Source/CPack/cpack.cxx +++ b/Source/CPack/cpack.cxx @@ -27,7 +27,6 @@ #include #include -#include // auto_ptr //---------------------------------------------------------------------------- static const char * cmDocumentationName[][3] = @@ -181,7 +180,6 @@ int main (int argc, char *argv[]) { cmSystemTools::FindExecutableDirectory(argv[0]); cmCPackLog log; - int nocwd = 0; log.SetErrorPrefix("CPack Error: "); log.SetWarningPrefix("CPack Warning: "); @@ -194,7 +192,7 @@ int main (int argc, char *argv[]) { cmCPack_Log(&log, cmCPackLog::LOG_ERROR, "Current working directory cannot be established." << std::endl); - nocwd = 1; + return 1; } std::string generator; @@ -276,7 +274,7 @@ int main (int argc, char *argv[]) cminst.RemoveUnscriptableCommands(); cmGlobalGenerator cmgg; cmgg.SetCMakeInstance(&cminst); - std::auto_ptr cmlg(cmgg.CreateLocalGenerator()); + cmsys::auto_ptr cmlg(cmgg.CreateLocalGenerator()); cmMakefile* globalMF = cmlg->GetMakefile(); bool cpackConfigFileSpecified = true; @@ -298,7 +296,7 @@ int main (int argc, char *argv[]) * should launch cpack using "cpackConfigFile" if it exists * in the current directory. */ - if((doc.CheckOptions(argc, argv,"-G") || nocwd) && !(argc==1)) + if((doc.CheckOptions(argc, argv,"-G")) && !(argc==1)) { help = true; } -- cgit v1.2.3