summaryrefslogtreecommitdiffstats
path: root/Source/CPack/cpack.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/CPack/cpack.cxx')
-rw-r--r--Source/CPack/cpack.cxx20
1 files changed, 8 insertions, 12 deletions
diff --git a/Source/CPack/cpack.cxx b/Source/CPack/cpack.cxx
index 94e1615..771519c 100644
--- a/Source/CPack/cpack.cxx
+++ b/Source/CPack/cpack.cxx
@@ -27,13 +27,13 @@
#include <cmsys/SystemTools.hxx>
static const char* cmDocumentationName[][2] = {
- { 0, " cpack - Packaging driver provided by CMake." },
- { 0, 0 }
+ { CM_NULLPTR, " cpack - Packaging driver provided by CMake." },
+ { CM_NULLPTR, CM_NULLPTR }
};
static const char* cmDocumentationUsage[][2] = {
- { 0, " cpack -G <generator> [options]" },
- { 0, 0 }
+ { CM_NULLPTR, " cpack -G <generator> [options]" },
+ { CM_NULLPTR, CM_NULLPTR }
};
static const char* cmDocumentationOptions[][2] = {
@@ -47,7 +47,7 @@ static const char* cmDocumentationOptions[][2] = {
{ "-R <package version>", "override/define CPACK_PACKAGE_VERSION" },
{ "-B <package directory>", "override/define CPACK_PACKAGE_DIRECTORY" },
{ "--vendor <vendor name>", "override/define CPACK_PACKAGE_VENDOR" },
- { 0, 0 }
+ { CM_NULLPTR, CM_NULLPTR }
};
int cpackUnknownArgument(const char*, void*)
@@ -185,7 +185,7 @@ int main(int argc, char const* const* argv)
cminst.GetCurrentSnapshot().SetDefaultDefinitions();
cminst.GetState()->RemoveUnscriptableCommands();
cmGlobalGenerator cmgg(&cminst);
- cmsys::auto_ptr<cmMakefile> globalMF(
+ CM_AUTO_PTR<cmMakefile> globalMF(
new cmMakefile(&cmgg, cminst.GetCurrentSnapshot()));
#if defined(__CYGWIN__)
globalMF->AddDefinition("CMAKE_LEGACY_CYGWIN_WIN32", "0");
@@ -200,7 +200,7 @@ int main(int argc, char const* const* argv)
cmCPackGeneratorFactory generators;
generators.SetLogger(&log);
- cmCPackGenerator* cpackGenerator = 0;
+ cmCPackGenerator* cpackGenerator = CM_NULLPTR;
cmDocumentation doc;
doc.addCPackStandardDocSections();
@@ -209,11 +209,7 @@ int main(int argc, char const* const* argv)
* should launch cpack using "cpackConfigFile" if it exists
* in the current directory.
*/
- if ((doc.CheckOptions(argc, argv, "-G")) && !(argc == 1)) {
- help = true;
- } else {
- help = false;
- }
+ help = doc.CheckOptions(argc, argv, "-G") && argc != 1;
// This part is used for cpack documentation lookup as well.
cminst.AddCMakePaths();