summaryrefslogtreecommitdiffstats
path: root/Source/CPack
diff options
context:
space:
mode:
Diffstat (limited to 'Source/CPack')
-rw-r--r--Source/CPack/IFW/cmCPackIFWGenerator.cxx16
-rw-r--r--Source/CPack/IFW/cmCPackIFWInstaller.cxx4
-rw-r--r--Source/CPack/IFW/cmCPackIFWPackage.cxx8
-rw-r--r--Source/CPack/IFW/cmCPackIFWRepository.cxx4
-rw-r--r--Source/CPack/cmCPackArchiveGenerator.cxx6
-rw-r--r--Source/CPack/cmCPackComponentGroup.h4
-rw-r--r--Source/CPack/cmCPackDebGenerator.cxx10
-rw-r--r--Source/CPack/cmCPackGenerator.cxx22
-rw-r--r--Source/CPack/cmCPackGenerator.h2
-rw-r--r--Source/CPack/cmCPackGeneratorFactory.cxx4
-rw-r--r--Source/CPack/cmCPackLog.cxx8
-rw-r--r--Source/CPack/cmCPackNSISGenerator.cxx14
-rw-r--r--Source/CPack/cmCPackRPMGenerator.cxx4
-rw-r--r--Source/CPack/cpack.cxx12
14 files changed, 62 insertions, 56 deletions
diff --git a/Source/CPack/IFW/cmCPackIFWGenerator.cxx b/Source/CPack/IFW/cmCPackIFWGenerator.cxx
index accba08..4a5eb90 100644
--- a/Source/CPack/IFW/cmCPackIFWGenerator.cxx
+++ b/Source/CPack/IFW/cmCPackIFWGenerator.cxx
@@ -101,8 +101,9 @@ int cmCPackIFWGenerator::PackageFiles()
int retVal = 1;
cmCPackLogger(cmCPackLog::LOG_OUTPUT, "- Generate repository"
<< std::endl);
- bool res = cmSystemTools::RunSingleCommand(
- ifwCmd.c_str(), &output, &output, &retVal, 0, this->GeneratorVerbose, 0);
+ bool res = cmSystemTools::RunSingleCommand(ifwCmd.c_str(), &output,
+ &output, &retVal, CM_NULLPTR,
+ this->GeneratorVerbose, 0);
if (!res || retVal) {
cmGeneratedFileStream ofs(ifwTmpFile.c_str());
ofs << "# Run command: " << ifwCmd << std::endl
@@ -178,8 +179,9 @@ int cmCPackIFWGenerator::PackageFiles()
std::string output;
int retVal = 1;
cmCPackLogger(cmCPackLog::LOG_OUTPUT, "- Generate package" << std::endl);
- bool res = cmSystemTools::RunSingleCommand(
- ifwCmd.c_str(), &output, &output, &retVal, 0, this->GeneratorVerbose, 0);
+ bool res = cmSystemTools::RunSingleCommand(ifwCmd.c_str(), &output,
+ &output, &retVal, CM_NULLPTR,
+ this->GeneratorVerbose, 0);
if (!res || retVal) {
cmGeneratedFileStream ofs(ifwTmpFile.c_str());
ofs << "# Run command: " << ifwCmd << std::endl
@@ -526,7 +528,7 @@ cmCPackIFWPackage* cmCPackIFWGenerator::GetGroupPackage(
{
std::map<cmCPackComponentGroup*, cmCPackIFWPackage*>::const_iterator pit =
GroupPackages.find(group);
- return pit != GroupPackages.end() ? pit->second : 0;
+ return pit != GroupPackages.end() ? pit->second : CM_NULLPTR;
}
cmCPackIFWPackage* cmCPackIFWGenerator::GetComponentPackage(
@@ -534,7 +536,7 @@ cmCPackIFWPackage* cmCPackIFWGenerator::GetComponentPackage(
{
std::map<cmCPackComponent*, cmCPackIFWPackage*>::const_iterator pit =
ComponentPackages.find(component);
- return pit != ComponentPackages.end() ? pit->second : 0;
+ return pit != ComponentPackages.end() ? pit->second : CM_NULLPTR;
}
cmCPackIFWRepository* cmCPackIFWGenerator::GetRepository(
@@ -556,7 +558,7 @@ cmCPackIFWRepository* cmCPackIFWGenerator::GetRepository(
}
} else {
Repositories.erase(repositoryName);
- repository = 0;
+ repository = CM_NULLPTR;
cmCPackLogger(cmCPackLog::LOG_WARNING, "Invalid repository \""
<< repositoryName << "\""
<< " configuration. Repository will be skipped."
diff --git a/Source/CPack/IFW/cmCPackIFWInstaller.cxx b/Source/CPack/IFW/cmCPackIFWInstaller.cxx
index 74f6da6..13a3613 100644
--- a/Source/CPack/IFW/cmCPackIFWInstaller.cxx
+++ b/Source/CPack/IFW/cmCPackIFWInstaller.cxx
@@ -33,13 +33,13 @@
} while (0)
cmCPackIFWInstaller::cmCPackIFWInstaller()
- : Generator(0)
+ : Generator(CM_NULLPTR)
{
}
const char* cmCPackIFWInstaller::GetOption(const std::string& op) const
{
- return Generator ? Generator->GetOption(op) : 0;
+ return Generator ? Generator->GetOption(op) : CM_NULLPTR;
}
bool cmCPackIFWInstaller::IsOn(const std::string& op) const
diff --git a/Source/CPack/IFW/cmCPackIFWPackage.cxx b/Source/CPack/IFW/cmCPackIFWPackage.cxx
index 405d668..5db06e6 100644
--- a/Source/CPack/IFW/cmCPackIFWPackage.cxx
+++ b/Source/CPack/IFW/cmCPackIFWPackage.cxx
@@ -96,15 +96,15 @@ std::string cmCPackIFWPackage::DependenceStruct::NameWithCompare() const
//------------------------------------------------------ cmCPackIFWPackage ---
cmCPackIFWPackage::cmCPackIFWPackage()
- : Generator(0)
- , Installer(0)
+ : Generator(CM_NULLPTR)
+ , Installer(CM_NULLPTR)
{
}
const char* cmCPackIFWPackage::GetOption(const std::string& op) const
{
- const char* option = Generator ? Generator->GetOption(op) : 0;
- return option && *option ? option : 0;
+ const char* option = Generator ? Generator->GetOption(op) : CM_NULLPTR;
+ return option && *option ? option : CM_NULLPTR;
}
bool cmCPackIFWPackage::IsOn(const std::string& op) const
diff --git a/Source/CPack/IFW/cmCPackIFWRepository.cxx b/Source/CPack/IFW/cmCPackIFWRepository.cxx
index e4fa569..ee6d5e5 100644
--- a/Source/CPack/IFW/cmCPackIFWRepository.cxx
+++ b/Source/CPack/IFW/cmCPackIFWRepository.cxx
@@ -35,7 +35,7 @@
cmCPackIFWRepository::cmCPackIFWRepository()
: Update(None)
- , Generator(0)
+ , Generator(CM_NULLPTR)
{
}
@@ -63,7 +63,7 @@ bool cmCPackIFWRepository::IsValid() const
const char* cmCPackIFWRepository::GetOption(const std::string& op) const
{
- return Generator ? Generator->GetOption(op) : 0;
+ return Generator ? Generator->GetOption(op) : CM_NULLPTR;
}
bool cmCPackIFWRepository::IsOn(const std::string& op) const
diff --git a/Source/CPack/cmCPackArchiveGenerator.cxx b/Source/CPack/cmCPackArchiveGenerator.cxx
index baf6719..b1f6864 100644
--- a/Source/CPack/cmCPackArchiveGenerator.cxx
+++ b/Source/CPack/cmCPackArchiveGenerator.cxx
@@ -68,7 +68,7 @@ int cmCPackArchiveGenerator::addOneComponentToArchive(
++fileIt) {
std::string rp = filePrefix + *fileIt;
cmCPackLogger(cmCPackLog::LOG_DEBUG, "Adding file: " << rp << std::endl);
- archive.Add(rp, 0, 0, false);
+ archive.Add(rp, 0, CM_NULLPTR, false);
if (!archive) {
cmCPackLogger(cmCPackLog::LOG_ERROR, "ERROR while packaging files: "
<< archive.GetError() << std::endl);
@@ -139,7 +139,7 @@ int cmCPackArchiveGenerator::PackageComponents(bool ignoreGroup)
for (compIt = this->Components.begin(); compIt != this->Components.end();
++compIt) {
// Does the component belong to a group?
- if (compIt->second.Group == NULL) {
+ if (compIt->second.Group == CM_NULLPTR) {
cmCPackLogger(
cmCPackLog::LOG_VERBOSE, "Component <"
<< compIt->second.Name
@@ -246,7 +246,7 @@ int cmCPackArchiveGenerator::PackageFiles()
// Get the relative path to the file
std::string rp =
cmSystemTools::RelativePath(toplevel.c_str(), fileIt->c_str());
- archive.Add(rp, 0, 0, false);
+ archive.Add(rp, 0, CM_NULLPTR, false);
if (!archive) {
cmCPackLogger(cmCPackLog::LOG_ERROR, "Problem while adding file< "
<< *fileIt << "> to archive <" << packageFileNames[0]
diff --git a/Source/CPack/cmCPackComponentGroup.h b/Source/CPack/cmCPackComponentGroup.h
index 5361d95..01a9e76 100644
--- a/Source/CPack/cmCPackComponentGroup.h
+++ b/Source/CPack/cmCPackComponentGroup.h
@@ -43,7 +43,7 @@ class cmCPackComponent
{
public:
cmCPackComponent()
- : Group(0)
+ : Group(CM_NULLPTR)
, IsRequired(true)
, IsHidden(false)
, IsDisabledByDefault(false)
@@ -117,7 +117,7 @@ class cmCPackComponentGroup
{
public:
cmCPackComponentGroup()
- : ParentGroup(0)
+ : ParentGroup(CM_NULLPTR)
{
}
diff --git a/Source/CPack/cmCPackDebGenerator.cxx b/Source/CPack/cmCPackDebGenerator.cxx
index b659359..3edc430 100644
--- a/Source/CPack/cmCPackDebGenerator.cxx
+++ b/Source/CPack/cmCPackDebGenerator.cxx
@@ -133,7 +133,7 @@ int cmCPackDebGenerator::PackageComponents(bool ignoreGroup)
for (compIt = this->Components.begin(); compIt != this->Components.end();
++compIt) {
// Does the component belong to a group?
- if (compIt->second.Group == NULL) {
+ if (compIt->second.Group == CM_NULLPTR) {
cmCPackLogger(
cmCPackLog::LOG_VERBOSE, "Component <"
<< compIt->second.Name
@@ -692,7 +692,7 @@ std::string cmCPackDebGenerator::GetComponentInstallDirNameSuffix(
// the current COMPONENT belongs to.
std::string groupVar =
"CPACK_COMPONENT_" + cmSystemTools::UpperCase(componentName) + "_GROUP";
- if (NULL != GetOption(groupVar)) {
+ if (CM_NULLPTR != GetOption(groupVar)) {
return std::string(GetOption(groupVar));
} else {
return componentName;
@@ -917,18 +917,18 @@ static int ar_append(const char* archive,
{
int eval = 0;
FILE* aFile = cmSystemTools::Fopen(archive, "wb+");
- if (aFile != NULL) {
+ if (aFile != CM_NULLPTR) {
fwrite(ARMAG, SARMAG, 1, aFile);
if (fseek(aFile, 0, SEEK_END) != -1) {
CF cf;
struct stat sb;
/* Read from disk, write to an archive; pad on write. */
- SETCF(NULL, 0, aFile, archive, WPAD);
+ SETCF(CM_NULLPTR, CM_NULLPTR, aFile, archive, WPAD);
for (std::vector<std::string>::const_iterator fileIt = files.begin();
fileIt != files.end(); ++fileIt) {
const char* filename = fileIt->c_str();
FILE* file = cmSystemTools::Fopen(filename, "rb");
- if (file == NULL) {
+ if (file == CM_NULLPTR) {
eval = -1;
continue;
}
diff --git a/Source/CPack/cmCPackGenerator.cxx b/Source/CPack/cmCPackGenerator.cxx
index c8b075d..914d0dc 100644
--- a/Source/CPack/cmCPackGenerator.cxx
+++ b/Source/CPack/cmCPackGenerator.cxx
@@ -34,14 +34,14 @@
cmCPackGenerator::cmCPackGenerator()
{
this->GeneratorVerbose = cmSystemTools::OUTPUT_NONE;
- this->MakefileMap = 0;
- this->Logger = 0;
+ this->MakefileMap = CM_NULLPTR;
+ this->Logger = CM_NULLPTR;
this->componentPackageMethod = ONE_PACKAGE_PER_GROUP;
}
cmCPackGenerator::~cmCPackGenerator()
{
- this->MakefileMap = 0;
+ this->MakefileMap = CM_NULLPTR;
}
void cmCPackGeneratorProgress(const char* msg, float prog, void* ptr)
@@ -251,8 +251,9 @@ int cmCPackGenerator::InstallProjectViaInstallCommands(
cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Execute: " << *it << std::endl);
std::string output;
int retVal = 1;
- bool resB = cmSystemTools::RunSingleCommand(
- it->c_str(), &output, &output, &retVal, 0, this->GeneratorVerbose, 0);
+ bool resB =
+ cmSystemTools::RunSingleCommand(it->c_str(), &output, &output, &retVal,
+ CM_NULLPTR, this->GeneratorVerbose, 0);
if (!resB || retVal) {
std::string tmpFile = this->GetOption("CPACK_TOPLEVEL_DIRECTORY");
tmpFile += "/InstallOutput.log";
@@ -814,7 +815,8 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects(
}
}
- if (NULL != mf->GetDefinition("CPACK_ABSOLUTE_DESTINATION_FILES")) {
+ if (CM_NULLPTR !=
+ mf->GetDefinition("CPACK_ABSOLUTE_DESTINATION_FILES")) {
if (!absoluteDestFiles.empty()) {
absoluteDestFiles += ";";
}
@@ -828,7 +830,7 @@ int cmCPackGenerator::InstallProjectViaInstallCMakeProjects(
std::string absoluteDestFileComponent =
std::string("CPACK_ABSOLUTE_DESTINATION_FILES") + "_" +
GetComponentInstallDirNameSuffix(installComponent);
- if (NULL != this->GetOption(absoluteDestFileComponent)) {
+ if (CM_NULLPTR != this->GetOption(absoluteDestFileComponent)) {
std::string absoluteDestFilesListComponent =
this->GetOption(absoluteDestFileComponent);
absoluteDestFilesListComponent += ";";
@@ -1178,7 +1180,7 @@ int cmCPackGenerator::PrepareGroupingKind()
std::string groupingType;
// Second way to specify grouping
- if (NULL != this->GetOption("CPACK_COMPONENTS_GROUPING")) {
+ if (CM_NULLPTR != this->GetOption("CPACK_COMPONENTS_GROUPING")) {
groupingType = this->GetOption("CPACK_COMPONENTS_GROUPING");
}
@@ -1355,7 +1357,7 @@ cmCPackComponent* cmCPackGenerator::GetComponent(
component->Group = GetComponentGroup(projectName, groupName);
component->Group->Components.push_back(component);
} else {
- component->Group = 0;
+ component->Group = CM_NULLPTR;
}
const char* description = this->GetOption(macroPrefix + "_DESCRIPTION");
@@ -1423,7 +1425,7 @@ cmCPackComponentGroup* cmCPackGenerator::GetComponentGroup(
group->ParentGroup = GetComponentGroup(projectName, parentGroupName);
group->ParentGroup->Subgroups.push_back(group);
} else {
- group->ParentGroup = 0;
+ group->ParentGroup = CM_NULLPTR;
}
}
return group;
diff --git a/Source/CPack/cmCPackGenerator.h b/Source/CPack/cmCPackGenerator.h
index 6313a0e..23e4bb7 100644
--- a/Source/CPack/cmCPackGenerator.h
+++ b/Source/CPack/cmCPackGenerator.h
@@ -136,7 +136,7 @@ protected:
cmInstalledFile const* GetInstalledFile(std::string const& name) const;
virtual const char* GetOutputExtension() { return ".cpack"; }
- virtual const char* GetOutputPostfix() { return 0; }
+ virtual const char* GetOutputPostfix() { return CM_NULLPTR; }
/**
* Prepare requested grouping kind from CPACK_xxx vars
diff --git a/Source/CPack/cmCPackGeneratorFactory.cxx b/Source/CPack/cmCPackGeneratorFactory.cxx
index 2210835..0f0268f 100644
--- a/Source/CPack/cmCPackGeneratorFactory.cxx
+++ b/Source/CPack/cmCPackGeneratorFactory.cxx
@@ -151,7 +151,7 @@ cmCPackGenerator* cmCPackGeneratorFactory::NewGenerator(
{
cmCPackGenerator* gen = this->NewGeneratorInternal(name);
if (!gen) {
- return 0;
+ return CM_NULLPTR;
}
this->Generators.push_back(gen);
gen->SetLogger(this->Logger);
@@ -164,7 +164,7 @@ cmCPackGenerator* cmCPackGeneratorFactory::NewGeneratorInternal(
cmCPackGeneratorFactory::t_GeneratorCreatorsMap::iterator it =
this->GeneratorCreators.find(name);
if (it == this->GeneratorCreators.end()) {
- return 0;
+ return CM_NULLPTR;
}
return (it->second)();
}
diff --git a/Source/CPack/cmCPackLog.cxx b/Source/CPack/cmCPackLog.cxx
index ff06eb8..339323e 100644
--- a/Source/CPack/cmCPackLog.cxx
+++ b/Source/CPack/cmCPackLog.cxx
@@ -28,13 +28,13 @@ cmCPackLog::cmCPackLog()
this->DefaultOutput = &std::cout;
this->DefaultError = &std::cerr;
- this->LogOutput = 0;
+ this->LogOutput = CM_NULLPTR;
this->LogOutputCleanup = false;
}
cmCPackLog::~cmCPackLog()
{
- this->SetLogOutputStream(0);
+ this->SetLogOutputStream(CM_NULLPTR);
}
void cmCPackLog::SetLogOutputStream(std::ostream* os)
@@ -48,13 +48,13 @@ void cmCPackLog::SetLogOutputStream(std::ostream* os)
bool cmCPackLog::SetLogOutputFile(const char* fname)
{
- cmGeneratedFileStream* cg = 0;
+ cmGeneratedFileStream* cg = CM_NULLPTR;
if (fname) {
cg = new cmGeneratedFileStream(fname);
}
if (cg && !*cg) {
delete cg;
- cg = 0;
+ cg = CM_NULLPTR;
}
this->SetLogOutputStream(cg);
if (!cg) {
diff --git a/Source/CPack/cmCPackNSISGenerator.cxx b/Source/CPack/cmCPackNSISGenerator.cxx
index 5123edd..d8ff907 100644
--- a/Source/CPack/cmCPackNSISGenerator.cxx
+++ b/Source/CPack/cmCPackNSISGenerator.cxx
@@ -212,7 +212,7 @@ int cmCPackNSISGenerator::PackageFiles()
std::map<std::string, cmCPackComponentGroup>::iterator groupIt;
for (groupIt = this->ComponentGroups.begin();
groupIt != this->ComponentGroups.end(); ++groupIt) {
- if (groupIt->second.ParentGroup == 0) {
+ if (groupIt->second.ParentGroup == CM_NULLPTR) {
componentCode +=
this->CreateComponentGroupDescription(&groupIt->second, macrosOut);
}
@@ -301,8 +301,9 @@ int cmCPackNSISGenerator::PackageFiles()
cmCPackLogger(cmCPackLog::LOG_VERBOSE, "Execute: " << nsisCmd << std::endl);
std::string output;
int retVal = 1;
- bool res = cmSystemTools::RunSingleCommand(
- nsisCmd.c_str(), &output, &output, &retVal, 0, this->GeneratorVerbose, 0);
+ bool res =
+ cmSystemTools::RunSingleCommand(nsisCmd.c_str(), &output, &output, &retVal,
+ CM_NULLPTR, this->GeneratorVerbose, 0);
if (!res || retVal) {
cmGeneratedFileStream ofs(tmpFile.c_str());
ofs << "# Run command: " << nsisCmd << std::endl
@@ -326,7 +327,7 @@ int cmCPackNSISGenerator::InitializeInternal()
"NSIS Generator cannot work with CPACK_INCLUDE_TOPLEVEL_DIRECTORY set. "
"This option will be reset to 0 (for this generator only)."
<< std::endl);
- this->SetOption("CPACK_INCLUDE_TOPLEVEL_DIRECTORY", 0);
+ this->SetOption("CPACK_INCLUDE_TOPLEVEL_DIRECTORY", CM_NULLPTR);
}
cmCPackLogger(cmCPackLog::LOG_DEBUG, "cmCPackNSISGenerator::Initialize()"
@@ -399,8 +400,9 @@ int cmCPackNSISGenerator::InitializeInternal()
<< std::endl);
std::string output;
int retVal = 1;
- bool resS = cmSystemTools::RunSingleCommand(
- nsisCmd.c_str(), &output, &output, &retVal, 0, this->GeneratorVerbose, 0);
+ bool resS =
+ cmSystemTools::RunSingleCommand(nsisCmd.c_str(), &output, &output, &retVal,
+ CM_NULLPTR, this->GeneratorVerbose, 0);
cmsys::RegularExpression versionRex("v([0-9]+.[0-9]+)");
cmsys::RegularExpression versionRexCVS("v(.*)\\.cvs");
if (!resS || retVal ||
diff --git a/Source/CPack/cmCPackRPMGenerator.cxx b/Source/CPack/cmCPackRPMGenerator.cxx
index bc10111..2568d17 100644
--- a/Source/CPack/cmCPackRPMGenerator.cxx
+++ b/Source/CPack/cmCPackRPMGenerator.cxx
@@ -121,7 +121,7 @@ int cmCPackRPMGenerator::PackageComponents(bool ignoreGroup)
for (compIt = this->Components.begin(); compIt != this->Components.end();
++compIt) {
// Does the component belong to a group?
- if (compIt->second.Group == NULL) {
+ if (compIt->second.Group == CM_NULLPTR) {
cmCPackLogger(
cmCPackLog::LOG_VERBOSE, "Component <"
<< compIt->second.Name
@@ -245,7 +245,7 @@ std::string cmCPackRPMGenerator::GetComponentInstallDirNameSuffix(
// the current COMPONENT belongs to.
std::string groupVar =
"CPACK_COMPONENT_" + cmSystemTools::UpperCase(componentName) + "_GROUP";
- if (NULL != GetOption(groupVar)) {
+ if (CM_NULLPTR != GetOption(groupVar)) {
return std::string(GetOption(groupVar));
} else {
return componentName;
diff --git a/Source/CPack/cpack.cxx b/Source/CPack/cpack.cxx
index 425afd9..b4a2c6f 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*)
@@ -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();