Merge topic 'compiler-features'

059a6ca0 Merge branch 'unknown-aliased-target' into compiler-features
1d6909a2 use CM_NULLPTR
b4b73f56 cxx features: add check for nullptr
a7a92390 mark functions with CM_OVERRIDE
9e2d6f0c CM_OVERRIDE: mark destructor overridden in the feature test.
2ca76a66 Validate target name in ALIASED_TARGET property getter
This commit is contained in:
Brad King 2016-06-28 09:06:39 -04:00 committed by CMake Topic Stage
commit f913121758
401 changed files with 2302 additions and 2123 deletions

View File

@ -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."

View File

@ -46,7 +46,7 @@ public:
/**
* Destruct IFW generator
*/
virtual ~cmCPackIFWGenerator();
~cmCPackIFWGenerator() CM_OVERRIDE;
/**
* Compare \a version with QtIFW framework version
@ -70,18 +70,18 @@ protected:
* @brief Initialize generator
* @return 0 on failure
*/
virtual int InitializeInternal();
virtual int PackageFiles();
virtual const char* GetPackagingInstallPrefix();
int InitializeInternal() CM_OVERRIDE;
int PackageFiles() CM_OVERRIDE;
const char* GetPackagingInstallPrefix() CM_OVERRIDE;
/**
* @brief Extension of binary installer
* @return Executable suffix or value from default implementation
*/
virtual const char* GetOutputExtension();
const char* GetOutputExtension() CM_OVERRIDE;
virtual std::string GetComponentInstallDirNameSuffix(
const std::string& componentName);
std::string GetComponentInstallDirNameSuffix(
const std::string& componentName) CM_OVERRIDE;
/**
* @brief Get Component
@ -92,8 +92,8 @@ protected:
*
* @return Pointer to component
*/
virtual cmCPackComponent* GetComponent(const std::string& projectName,
const std::string& componentName);
cmCPackComponent* GetComponent(const std::string& projectName,
const std::string& componentName) CM_OVERRIDE;
/**
* @brief Get group of component
@ -104,12 +104,13 @@ protected:
*
* @return Pointer to component group
*/
virtual cmCPackComponentGroup* GetComponentGroup(
const std::string& projectName, const std::string& groupName);
cmCPackComponentGroup* GetComponentGroup(
const std::string& projectName, const std::string& groupName) CM_OVERRIDE;
enum cmCPackGenerator::CPackSetDestdirSupport SupportsSetDestdir() const;
virtual bool SupportsAbsoluteDestination() const;
virtual bool SupportsComponentInstallation() const;
enum cmCPackGenerator::CPackSetDestdirSupport SupportsSetDestdir() const
CM_OVERRIDE;
bool SupportsAbsoluteDestination() const CM_OVERRIDE;
bool SupportsComponentInstallation() const CM_OVERRIDE;
protected:
// Methods

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -27,10 +27,10 @@ public:
* Construct generator
*/
cmCPack7zGenerator();
virtual ~cmCPack7zGenerator();
~cmCPack7zGenerator() CM_OVERRIDE;
protected:
virtual const char* GetOutputExtension() { return ".7z"; }
const char* GetOutputExtension() CM_OVERRIDE { return ".7z"; }
};
#endif

View File

@ -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]

View File

@ -32,14 +32,14 @@ public:
* Construct generator
*/
cmCPackArchiveGenerator(cmArchiveWrite::Compress, std::string const& format);
virtual ~cmCPackArchiveGenerator();
~cmCPackArchiveGenerator() CM_OVERRIDE;
// Used to add a header to the archive
virtual int GenerateHeader(std::ostream* os);
// component support
virtual bool SupportsComponentInstallation() const;
bool SupportsComponentInstallation() const CM_OVERRIDE;
protected:
virtual int InitializeInternal();
int InitializeInternal() CM_OVERRIDE;
/**
* Add the files belonging to the specified component
* to the provided (already opened) archive.
@ -55,7 +55,7 @@ protected:
* method will call either PackageComponents or
* PackageComponentsAllInOne.
*/
int PackageFiles();
int PackageFiles() CM_OVERRIDE;
/**
* The method used to package files when component
* install is used. This will create one
@ -67,7 +67,7 @@ protected:
* components will be put in a single installer.
*/
int PackageComponentsAllInOne();
virtual const char* GetOutputExtension() = 0;
const char* GetOutputExtension() CM_OVERRIDE = 0;
cmArchiveWrite::Compress Compress;
std::string ArchiveFormat;
};

View File

@ -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)
{
}

View File

@ -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;
}

View File

@ -28,7 +28,7 @@ public:
* Construct generator
*/
cmCPackDebGenerator();
virtual ~cmCPackDebGenerator();
~cmCPackDebGenerator() CM_OVERRIDE;
static bool CanGenerate()
{
@ -45,7 +45,7 @@ public:
}
protected:
virtual int InitializeInternal();
int InitializeInternal() CM_OVERRIDE;
/**
* This method factors out the work done in component packaging case.
*/
@ -62,11 +62,11 @@ protected:
* components will be put in a single installer.
*/
int PackageComponentsAllInOne(const std::string& compInstDirName);
virtual int PackageFiles();
virtual const char* GetOutputExtension() { return ".deb"; }
virtual bool SupportsComponentInstallation() const;
virtual std::string GetComponentInstallDirNameSuffix(
const std::string& componentName);
int PackageFiles() CM_OVERRIDE;
const char* GetOutputExtension() CM_OVERRIDE { return ".deb"; }
bool SupportsComponentInstallation() const CM_OVERRIDE;
std::string GetComponentInstallDirNameSuffix(
const std::string& componentName) CM_OVERRIDE;
private:
int createDeb();

View File

@ -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;

View File

@ -101,7 +101,7 @@ public:
* Construct generator
*/
cmCPackGenerator();
virtual ~cmCPackGenerator();
~cmCPackGenerator() CM_OVERRIDE;
//! Set and get the options
void SetOption(const std::string& op, const char* value);
@ -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

View File

@ -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)();
}

View File

@ -28,7 +28,7 @@ public:
cmTypeMacro(cmCPackGeneratorFactory, cmObject);
cmCPackGeneratorFactory();
~cmCPackGeneratorFactory();
~cmCPackGeneratorFactory() CM_OVERRIDE;
//! Get the generator
cmCPackGenerator* NewGenerator(const std::string& name);

View File

@ -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) {

View File

@ -42,7 +42,7 @@ public:
cmTypeMacro(cmCPackLog, cmObject);
cmCPackLog();
~cmCPackLog();
~cmCPackLog() CM_OVERRIDE;
enum __log_tags
{

View File

@ -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 ||

View File

@ -36,21 +36,22 @@ public:
* Construct generator
*/
cmCPackNSISGenerator(bool nsis64 = false);
virtual ~cmCPackNSISGenerator();
~cmCPackNSISGenerator() CM_OVERRIDE;
protected:
virtual int InitializeInternal();
int InitializeInternal() CM_OVERRIDE;
void CreateMenuLinks(std::ostream& str, std::ostream& deleteStr);
int PackageFiles();
virtual const char* GetOutputExtension() { return ".exe"; }
virtual const char* GetOutputPostfix() { return "win32"; }
int PackageFiles() CM_OVERRIDE;
const char* GetOutputExtension() CM_OVERRIDE { return ".exe"; }
const char* GetOutputPostfix() CM_OVERRIDE { return "win32"; }
bool GetListOfSubdirectories(const char* dir,
std::vector<std::string>& dirs);
enum cmCPackGenerator::CPackSetDestdirSupport SupportsSetDestdir() const;
virtual bool SupportsAbsoluteDestination() const;
virtual bool SupportsComponentInstallation() const;
enum cmCPackGenerator::CPackSetDestdirSupport SupportsSetDestdir() const
CM_OVERRIDE;
bool SupportsAbsoluteDestination() const CM_OVERRIDE;
bool SupportsComponentInstallation() const CM_OVERRIDE;
/// Produce a string that contains the NSIS code to describe a
/// particular component. Any added macros will be emitted via

View File

@ -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;

View File

@ -32,7 +32,7 @@ public:
* Construct generator
*/
cmCPackRPMGenerator();
virtual ~cmCPackRPMGenerator();
~cmCPackRPMGenerator() CM_OVERRIDE;
static bool CanGenerate()
{
@ -49,8 +49,8 @@ public:
}
protected:
virtual int InitializeInternal();
virtual int PackageFiles();
int InitializeInternal() CM_OVERRIDE;
int PackageFiles() CM_OVERRIDE;
/**
* This method factors out the work done in component packaging case.
*/
@ -67,10 +67,10 @@ protected:
* components will be put in a single installer.
*/
int PackageComponentsAllInOne(const std::string& compInstDirName);
virtual const char* GetOutputExtension() { return ".rpm"; }
virtual bool SupportsComponentInstallation() const;
virtual std::string GetComponentInstallDirNameSuffix(
const std::string& componentName);
const char* GetOutputExtension() CM_OVERRIDE { return ".rpm"; }
bool SupportsComponentInstallation() const CM_OVERRIDE;
std::string GetComponentInstallDirNameSuffix(
const std::string& componentName) CM_OVERRIDE;
void AddGeneratedPackageNames();
};

View File

@ -28,13 +28,13 @@ public:
* Construct generator
*/
cmCPackSTGZGenerator();
virtual ~cmCPackSTGZGenerator();
~cmCPackSTGZGenerator() CM_OVERRIDE;
protected:
int PackageFiles();
virtual int InitializeInternal();
int GenerateHeader(std::ostream* os);
virtual const char* GetOutputExtension() { return ".sh"; }
int PackageFiles() CM_OVERRIDE;
int InitializeInternal() CM_OVERRIDE;
int GenerateHeader(std::ostream* os) CM_OVERRIDE;
const char* GetOutputExtension() CM_OVERRIDE { return ".sh"; }
};
#endif

View File

@ -27,10 +27,10 @@ public:
* Construct generator
*/
cmCPackTGZGenerator();
virtual ~cmCPackTGZGenerator();
~cmCPackTGZGenerator() CM_OVERRIDE;
protected:
virtual const char* GetOutputExtension() { return ".tar.gz"; }
const char* GetOutputExtension() CM_OVERRIDE { return ".tar.gz"; }
};
#endif

View File

@ -27,10 +27,10 @@ public:
* Construct generator
*/
cmCPackTXZGenerator();
virtual ~cmCPackTXZGenerator();
~cmCPackTXZGenerator() CM_OVERRIDE;
protected:
virtual const char* GetOutputExtension() { return ".tar.xz"; }
const char* GetOutputExtension() CM_OVERRIDE { return ".tar.xz"; }
};
#endif

View File

@ -26,10 +26,10 @@ public:
* Construct generator
*/
cmCPackTarBZip2Generator();
virtual ~cmCPackTarBZip2Generator();
~cmCPackTarBZip2Generator() CM_OVERRIDE;
protected:
virtual const char* GetOutputExtension() { return ".tar.bz2"; }
const char* GetOutputExtension() CM_OVERRIDE { return ".tar.bz2"; }
};
#endif

View File

@ -26,10 +26,10 @@ public:
* Construct generator
*/
cmCPackTarCompressGenerator();
virtual ~cmCPackTarCompressGenerator();
~cmCPackTarCompressGenerator() CM_OVERRIDE;
protected:
virtual const char* GetOutputExtension() { return ".tar.Z"; }
const char* GetOutputExtension() CM_OVERRIDE { return ".tar.Z"; }
};
#endif

View File

@ -27,10 +27,10 @@ public:
* Construct generator
*/
cmCPackZIPGenerator();
virtual ~cmCPackZIPGenerator();
~cmCPackZIPGenerator() CM_OVERRIDE;
protected:
virtual const char* GetOutputExtension() { return ".zip"; }
const char* GetOutputExtension() CM_OVERRIDE { return ".zip"; }
};
#endif

View File

@ -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();

View File

@ -139,13 +139,13 @@ std::string cmCTestBZR::LoadInfo()
{
// Run "bzr info" to get the repository info from the work tree.
const char* bzr = this->CommandLineTool.c_str();
const char* bzr_info[] = { bzr, "info", 0 };
const char* bzr_info[] = { bzr, "info", CM_NULLPTR };
InfoParser iout(this, "info-out> ");
OutputLogger ierr(this->Log, "info-err> ");
this->RunChild(bzr_info, &iout, &ierr);
// Run "bzr revno" to get the repository revision number from the work tree.
const char* bzr_revno[] = { bzr, "revno", 0 };
const char* bzr_revno[] = { bzr, "revno", CM_NULLPTR };
std::string rev;
RevnoParser rout(this, "revno-out> ", rev);
OutputLogger rerr(this->Log, "revno-err> ");
@ -183,14 +183,15 @@ public:
{
this->InitializeParser();
}
~LogParser() { this->CleanupParser(); }
~LogParser() CM_OVERRIDE { this->CleanupParser(); }
int InitializeParser() CM_OVERRIDE
{
int res = cmXMLParser::InitializeParser();
if (res) {
XML_SetUnknownEncodingHandler(static_cast<XML_Parser>(this->Parser),
cmBZRXMLParserUnknownEncodingHandler, 0);
cmBZRXMLParserUnknownEncodingHandler,
CM_NULLPTR);
}
return res;
}
@ -380,7 +381,7 @@ bool cmCTestBZR::UpdateImpl()
bzr_update.push_back(this->URL.c_str());
bzr_update.push_back(0);
bzr_update.push_back(CM_NULLPTR);
// For some reason bzr uses stderr to display the update status.
OutputLogger out(this->Log, "pull-out> ");
@ -408,7 +409,8 @@ void cmCTestBZR::LoadRevisions()
// Run "bzr log" to get all global revisions of interest.
const char* bzr = this->CommandLineTool.c_str();
const char* bzr_log[] = {
bzr, "log", "-v", "-r", revs.c_str(), "--xml", this->URL.c_str(), 0
bzr, "log", "-v", "-r", revs.c_str(), "--xml", this->URL.c_str(),
CM_NULLPTR
};
{
LogParser out(this, "log-out> ");
@ -465,7 +467,7 @@ void cmCTestBZR::LoadModifications()
{
// Run "bzr status" which reports local modifications.
const char* bzr = this->CommandLineTool.c_str();
const char* bzr_status[] = { bzr, "status", "-SV", 0 };
const char* bzr_status[] = { bzr, "status", "-SV", CM_NULLPTR };
StatusParser out(this, "status-out> ");
OutputLogger err(this->Log, "status-err> ");
this->RunChild(bzr_status, &out, &err);

View File

@ -24,20 +24,20 @@ public:
/** Construct with a CTest instance and update log stream. */
cmCTestBZR(cmCTest* ctest, std::ostream& log);
virtual ~cmCTestBZR();
~cmCTestBZR() CM_OVERRIDE;
private:
// Implement cmCTestVC internal API.
virtual void NoteOldRevision();
virtual void NoteNewRevision();
virtual bool UpdateImpl();
void NoteOldRevision() CM_OVERRIDE;
void NoteNewRevision() CM_OVERRIDE;
bool UpdateImpl() CM_OVERRIDE;
// URL of repository directory checked out in the working tree.
std::string URL;
std::string LoadInfo();
void LoadModifications();
void LoadRevisions();
void LoadModifications() CM_OVERRIDE;
void LoadRevisions() CM_OVERRIDE;
// Parsing helper classes.
class InfoParser;

View File

@ -28,8 +28,8 @@
class cmCTestBatchTestHandler : public cmCTestMultiProcessHandler
{
public:
~cmCTestBatchTestHandler();
virtual void RunTests();
~cmCTestBatchTestHandler() CM_OVERRIDE;
void RunTests() CM_OVERRIDE;
protected:
void WriteBatchScript();

View File

@ -72,7 +72,7 @@ int cmCTestBuildAndTestHandler::RunCMake(std::string* outstring,
args.push_back(toolset);
}
const char* config = 0;
const char* config = CM_NULLPTR;
if (!this->CTest->GetConfigType().empty()) {
config = this->CTest->GetConfigType().c_str();
}
@ -158,10 +158,10 @@ public:
}
~cmCTestBuildAndTestCaptureRAII()
{
this->CM.SetProgressCallback(0, 0);
cmSystemTools::SetStderrCallback(0, 0);
cmSystemTools::SetStdoutCallback(0, 0);
cmSystemTools::SetMessageCallback(0, 0);
this->CM.SetProgressCallback(CM_NULLPTR, CM_NULLPTR);
cmSystemTools::SetStderrCallback(CM_NULLPTR, CM_NULLPTR);
cmSystemTools::SetStdoutCallback(CM_NULLPTR, CM_NULLPTR);
cmSystemTools::SetMessageCallback(CM_NULLPTR, CM_NULLPTR);
}
};
@ -247,7 +247,7 @@ int cmCTestBuildAndTestHandler::RunCMakeAndTest(std::string* outstring)
}
}
std::string output;
const char* config = 0;
const char* config = CM_NULLPTR;
if (!this->CTest->GetConfigType().empty()) {
config = this->CTest->GetConfigType().c_str();
}
@ -321,7 +321,7 @@ int cmCTestBuildAndTestHandler::RunCMakeAndTest(std::string* outstring)
for (size_t k = 0; k < this->TestCommandArgs.size(); ++k) {
testCommand.push_back(this->TestCommandArgs[k].c_str());
}
testCommand.push_back(0);
testCommand.push_back(CM_NULLPTR);
std::string outs;
int retval = 0;
// run the test from the this->BuildRunDir if set
@ -347,8 +347,8 @@ int cmCTestBuildAndTestHandler::RunCMakeAndTest(std::string* outstring)
}
}
int runTestRes =
this->CTest->RunTest(testCommand, &outs, &retval, 0, remainingTime, 0);
int runTestRes = this->CTest->RunTest(testCommand, &outs, &retval,
CM_NULLPTR, remainingTime, CM_NULLPTR);
if (runTestRes != cmsysProcess_State_Exited || retval != 0) {
out << "Test command failed: " << testCommand[0] << "\n";

View File

@ -30,12 +30,12 @@ public:
/*
* The main entry point for this class
*/
int ProcessHandler();
int ProcessHandler() CM_OVERRIDE;
//! Set all the build and test arguments
virtual int ProcessCommandLineArguments(
const std::string& currentArg, size_t& idx,
const std::vector<std::string>& allArgs);
int ProcessCommandLineArguments(const std::string& currentArg, size_t& idx,
const std::vector<std::string>& allArgs)
CM_OVERRIDE;
/*
* Get the output variable
@ -44,7 +44,7 @@ public:
cmCTestBuildAndTestHandler();
virtual void Initialize();
void Initialize() CM_OVERRIDE;
protected:
///! Run CMake and build a test and then run it as a single test.

View File

@ -19,14 +19,14 @@
cmCTestBuildCommand::cmCTestBuildCommand()
{
this->GlobalGenerator = 0;
this->GlobalGenerator = CM_NULLPTR;
this->Arguments[ctb_NUMBER_ERRORS] = "NUMBER_ERRORS";
this->Arguments[ctb_NUMBER_WARNINGS] = "NUMBER_WARNINGS";
this->Arguments[ctb_TARGET] = "TARGET";
this->Arguments[ctb_CONFIGURATION] = "CONFIGURATION";
this->Arguments[ctb_FLAGS] = "FLAGS";
this->Arguments[ctb_PROJECT_NAME] = "PROJECT_NAME";
this->Arguments[ctb_LAST] = 0;
this->Arguments[ctb_LAST] = CM_NULLPTR;
this->Last = ctb_LAST;
}
@ -34,7 +34,7 @@ cmCTestBuildCommand::~cmCTestBuildCommand()
{
if (this->GlobalGenerator) {
delete this->GlobalGenerator;
this->GlobalGenerator = 0;
this->GlobalGenerator = CM_NULLPTR;
}
}
@ -43,7 +43,7 @@ cmCTestGenericHandler* cmCTestBuildCommand::InitializeHandler()
cmCTestGenericHandler* handler = this->CTest->GetInitializedHandler("build");
if (!handler) {
this->SetError("internal CTest error. Cannot instantiate build handler");
return 0;
return CM_NULLPTR;
}
this->Handler = (cmCTestBuildHandler*)handler;
@ -91,7 +91,7 @@ cmCTestGenericHandler* cmCTestBuildCommand::InitializeHandler()
if (this->GlobalGenerator) {
if (this->GlobalGenerator->GetName() != cmakeGeneratorName) {
delete this->GlobalGenerator;
this->GlobalGenerator = 0;
this->GlobalGenerator = CM_NULLPTR;
}
}
if (!this->GlobalGenerator) {
@ -104,11 +104,11 @@ cmCTestGenericHandler* cmCTestBuildCommand::InitializeHandler()
e += "\"";
this->Makefile->IssueMessage(cmake::FATAL_ERROR, e);
cmSystemTools::SetFatalErrorOccured();
return 0;
return CM_NULLPTR;
}
}
if (strlen(cmakeBuildConfiguration) == 0) {
const char* config = 0;
const char* config = CM_NULLPTR;
#ifdef CMAKE_INTDIR
config = CMAKE_INTDIR;
#endif
@ -145,7 +145,7 @@ cmCTestGenericHandler* cmCTestBuildCommand::InitializeHandler()
"with a custom command line.";
/* clang-format on */
this->SetError(ostr.str());
return 0;
return CM_NULLPTR;
}
}

View File

@ -26,12 +26,12 @@ class cmCTestBuildCommand : public cmCTestHandlerCommand
{
public:
cmCTestBuildCommand();
~cmCTestBuildCommand();
~cmCTestBuildCommand() CM_OVERRIDE;
/**
* This is a virtual constructor for the command.
*/
virtual cmCommand* Clone()
cmCommand* Clone() CM_OVERRIDE
{
cmCTestBuildCommand* ni = new cmCTestBuildCommand;
ni->CTest = this->CTest;
@ -42,10 +42,10 @@ public:
/**
* The name of the command as specified in CMakeList.txt.
*/
virtual std::string GetName() const { return "ctest_build"; }
std::string GetName() const CM_OVERRIDE { return "ctest_build"; }
virtual bool InitialPass(std::vector<std::string> const& args,
cmExecutionStatus& status);
bool InitialPass(std::vector<std::string> const& args,
cmExecutionStatus& status) CM_OVERRIDE;
cmTypeMacro(cmCTestBuildCommand, cmCTestHandlerCommand);
@ -65,7 +65,7 @@ protected:
ctb_LAST
};
cmCTestGenericHandler* InitializeHandler();
cmCTestGenericHandler* InitializeHandler() CM_OVERRIDE;
};
#endif

View File

@ -92,7 +92,7 @@ static const char* cmCTestErrorMatches[] = {
"^The project cannot be built\\.",
"^\\[ERROR\\]",
"^Command .* failed with exit code",
0
CM_NULLPTR
};
static const char* cmCTestErrorExceptions[] = {
@ -107,7 +107,7 @@ static const char* cmCTestErrorExceptions[] = {
":[ \\t]+Where:",
"([^ :]+):([0-9]+): Warning",
"------ Build started: .* ------",
0
CM_NULLPTR
};
static const char* cmCTestWarningMatches[] = {
@ -132,7 +132,7 @@ static const char* cmCTestWarningMatches[] = {
"cc-[0-9]* CC: REMARK File = .*, Line = [0-9]*",
"^CMake Warning.*:",
"^\\[WARNING\\]",
0
CM_NULLPTR
};
static const char* cmCTestWarningExceptions[] = {
@ -152,7 +152,7 @@ static const char* cmCTestWarningExceptions[] = {
"ld32: WARNING 85: definition of dataKey in",
"cc: warning 422: Unknown option \"\\+b",
"_with_warning_C",
0
CM_NULLPTR
};
struct cmCTestBuildCompileErrorWarningRex
@ -170,7 +170,7 @@ static cmCTestBuildCompileErrorWarningRex cmCTestWarningErrorFileLine[] = {
{ "^([a-zA-Z./0-9_+ ~-]+)\\(([0-9]+)\\)", 1, 2 },
{ "\"([a-zA-Z./0-9_+ ~-]+)\", line ([0-9]+)", 1, 2 },
{ "File = ([a-zA-Z./0-9_+ ~-]+), Line = ([0-9]+)", 1, 2 },
{ 0, 0, 0 }
{ CM_NULLPTR, 0, 0 }
};
cmCTestBuildHandler::cmCTestBuildHandler()
@ -521,7 +521,7 @@ public:
{
}
FragmentCompare()
: FTC(0)
: FTC(CM_NULLPTR)
{
}
bool operator()(std::string const& l, std::string const& r)
@ -799,7 +799,7 @@ int cmCTestBuildHandler::RunMakeCommand(const char* command, int* retVal,
a != args.end(); ++a) {
argv.push_back(a->c_str());
}
argv.push_back(0);
argv.push_back(CM_NULLPTR);
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT, "Run command:",
this->Quiet);
@ -851,7 +851,7 @@ int cmCTestBuildHandler::RunMakeCommand(const char* command, int* retVal,
// For every chunk of data
int res;
while ((res = cmsysProcess_WaitForData(cp, &data, &length, 0))) {
while ((res = cmsysProcess_WaitForData(cp, &data, &length, CM_NULLPTR))) {
// Replace '\0' with '\n', since '\0' does not really make sense. This is
// for Visual Studio output
for (int cc = 0; cc < length; ++cc) {
@ -870,8 +870,9 @@ int cmCTestBuildHandler::RunMakeCommand(const char* command, int* retVal,
}
}
this->ProcessBuffer(0, 0, tick, tick_len, ofs, &this->BuildProcessingQueue);
this->ProcessBuffer(0, 0, tick, tick_len, ofs,
this->ProcessBuffer(CM_NULLPTR, 0, tick, tick_len, ofs,
&this->BuildProcessingQueue);
this->ProcessBuffer(CM_NULLPTR, 0, tick, tick_len, ofs,
&this->BuildProcessingErrorQueue);
cmCTestOptionalLog(this->CTest, HANDLER_PROGRESS_OUTPUT, " Size of output: "
<< ((this->BuildOutputLogSize + 512) / 1024) << "K"
@ -879,7 +880,7 @@ int cmCTestBuildHandler::RunMakeCommand(const char* command, int* retVal,
this->Quiet);
// Properly handle output of the build command
cmsysProcess_WaitForExit(cp, 0);
cmsysProcess_WaitForExit(cp, CM_NULLPTR);
int result = cmsysProcess_GetState(cp);
if (result == cmsysProcess_State_Exited) {

View File

@ -36,16 +36,16 @@ public:
/*
* The main entry point for this class
*/
int ProcessHandler();
int ProcessHandler() CM_OVERRIDE;
cmCTestBuildHandler();
void PopulateCustomVectors(cmMakefile* mf);
void PopulateCustomVectors(cmMakefile* mf) CM_OVERRIDE;
/**
* Initialize handler
*/
virtual void Initialize();
void Initialize() CM_OVERRIDE;
int GetTotalErrors() { return this->TotalErrors; }
int GetTotalWarnings() { return this->TotalWarnings; }

View File

@ -103,7 +103,7 @@ bool cmCTestCVS::UpdateImpl()
ai != args.end(); ++ai) {
cvs_update.push_back(ai->c_str());
}
cvs_update.push_back(0);
cvs_update.push_back(CM_NULLPTR);
UpdateParser out(this, "up-out> ");
UpdateParser err(this, "up-err> ");
@ -229,7 +229,8 @@ void cmCTestCVS::LoadRevisions(std::string const& file, const char* branchFlag,
// Run "cvs log" to get revisions of this file on this branch.
const char* cvs = this->CommandLineTool.c_str();
const char* cvs_log[] = { cvs, "log", "-N", branchFlag, file.c_str(), 0 };
const char* cvs_log[] = { cvs, "log", "-N",
branchFlag, file.c_str(), CM_NULLPTR };
LogParser out(this, "log-out> ", revisions);
OutputLogger err(this->Log, "log-err> ");

View File

@ -24,12 +24,12 @@ public:
/** Construct with a CTest instance and update log stream. */
cmCTestCVS(cmCTest* ctest, std::ostream& log);
virtual ~cmCTestCVS();
~cmCTestCVS() CM_OVERRIDE;
private:
// Implement cmCTestVC internal API.
virtual bool UpdateImpl();
virtual bool WriteXMLUpdates(cmXMLWriter& xml);
bool UpdateImpl() CM_OVERRIDE;
bool WriteXMLUpdates(cmXMLWriter& xml) CM_OVERRIDE;
// Update status for files in each directory.
class Directory : public std::map<std::string, PathStatus>

View File

@ -29,8 +29,8 @@ class cmCTestCommand : public cmCommand
public:
cmCTestCommand()
{
this->CTest = 0;
this->CTestScriptHandler = 0;
this->CTest = CM_NULLPTR;
this->CTestScriptHandler = CM_NULLPTR;
}
cmCTest* CTest;

View File

@ -18,7 +18,7 @@
cmCTestConfigureCommand::cmCTestConfigureCommand()
{
this->Arguments[ctc_OPTIONS] = "OPTIONS";
this->Arguments[ctc_LAST] = 0;
this->Arguments[ctc_LAST] = CM_NULLPTR;
this->Last = ctc_LAST;
}
@ -35,7 +35,7 @@ cmCTestGenericHandler* cmCTestConfigureCommand::InitializeHandler()
"Build directory not specified. Either use BUILD "
"argument to CTEST_CONFIGURE command or set CTEST_BINARY_DIRECTORY "
"variable");
return 0;
return CM_NULLPTR;
}
const char* ctestConfigureCommand =
@ -55,7 +55,7 @@ cmCTestGenericHandler* cmCTestConfigureCommand::InitializeHandler()
"Source directory not specified. Either use SOURCE "
"argument to CTEST_CONFIGURE command or set CTEST_SOURCE_DIRECTORY "
"variable");
return 0;
return CM_NULLPTR;
}
const std::string cmakelists_file = source_dir + "/CMakeLists.txt";
@ -63,7 +63,7 @@ cmCTestGenericHandler* cmCTestConfigureCommand::InitializeHandler()
std::ostringstream e;
e << "CMakeLists.txt file does not exist [" << cmakelists_file << "]";
this->SetError(e.str());
return 0;
return CM_NULLPTR;
}
bool multiConfig = false;
@ -90,8 +90,9 @@ cmCTestGenericHandler* cmCTestConfigureCommand::InitializeHandler()
cmakeConfigureCommand += option;
cmakeConfigureCommand += "\"";
if ((0 != strstr(option.c_str(), "CMAKE_BUILD_TYPE=")) ||
(0 != strstr(option.c_str(), "CMAKE_BUILD_TYPE:STRING="))) {
if ((CM_NULLPTR != strstr(option.c_str(), "CMAKE_BUILD_TYPE=")) ||
(CM_NULLPTR !=
strstr(option.c_str(), "CMAKE_BUILD_TYPE:STRING="))) {
cmakeBuildTypeInOptions = true;
}
}
@ -134,7 +135,7 @@ cmCTestGenericHandler* cmCTestConfigureCommand::InitializeHandler()
"Configure command is not specified. If this is a "
"\"built with CMake\" project, set CTEST_CMAKE_GENERATOR. If not, "
"set CTEST_CONFIGURE_COMMAND.");
return 0;
return CM_NULLPTR;
}
}
@ -143,7 +144,7 @@ cmCTestGenericHandler* cmCTestConfigureCommand::InitializeHandler()
if (!handler) {
this->SetError(
"internal CTest error. Cannot instantiate configure handler");
return 0;
return CM_NULLPTR;
}
handler->SetQuiet(this->Quiet);
return handler;

View File

@ -27,7 +27,7 @@ public:
/**
* This is a virtual constructor for the command.
*/
virtual cmCommand* Clone()
cmCommand* Clone() CM_OVERRIDE
{
cmCTestConfigureCommand* ni = new cmCTestConfigureCommand;
ni->CTest = this->CTest;
@ -38,12 +38,12 @@ public:
/**
* The name of the command as specified in CMakeList.txt.
*/
virtual std::string GetName() const { return "ctest_configure"; }
std::string GetName() const CM_OVERRIDE { return "ctest_configure"; }
cmTypeMacro(cmCTestConfigureCommand, cmCTestHandlerCommand);
protected:
cmCTestGenericHandler* InitializeHandler();
cmCTestGenericHandler* InitializeHandler() CM_OVERRIDE;
enum
{

View File

@ -29,11 +29,11 @@ public:
/*
* The main entry point for this class
*/
int ProcessHandler();
int ProcessHandler() CM_OVERRIDE;
cmCTestConfigureHandler();
void Initialize();
void Initialize() CM_OVERRIDE;
};
#endif

View File

@ -30,7 +30,7 @@ cmCTestGenericHandler* cmCTestCoverageCommand::InitializeHandler()
this->CTest->GetInitializedHandler("coverage"));
if (!handler) {
this->SetError("internal CTest error. Cannot instantiate test handler");
return 0;
return CM_NULLPTR;
}
// If a LABELS option was given, select only files with the labels.

View File

@ -27,7 +27,7 @@ public:
/**
* This is a virtual constructor for the command.
*/
virtual cmCommand* Clone()
cmCommand* Clone() CM_OVERRIDE
{
cmCTestCoverageCommand* ni = new cmCTestCoverageCommand;
ni->CTest = this->CTest;
@ -38,15 +38,15 @@ public:
/**
* The name of the command as specified in CMakeList.txt.
*/
virtual std::string GetName() const { return "ctest_coverage"; }
std::string GetName() const CM_OVERRIDE { return "ctest_coverage"; }
cmTypeMacro(cmCTestCoverageCommand, cmCTestHandlerCommand);
protected:
cmCTestGenericHandler* InitializeHandler();
cmCTestGenericHandler* InitializeHandler() CM_OVERRIDE;
virtual bool CheckArgumentKeyword(std::string const& arg);
virtual bool CheckArgumentValue(std::string const& arg);
bool CheckArgumentKeyword(std::string const& arg) CM_OVERRIDE;
bool CheckArgumentValue(std::string const& arg) CM_OVERRIDE;
enum
{

View File

@ -76,7 +76,7 @@ public:
i != this->CommandLineStrings.end(); ++i) {
args.push_back(i->c_str());
}
args.push_back(0); // null terminate
args.push_back(CM_NULLPTR); // null terminate
cmsysProcess_SetCommand(this->Process, &*args.begin());
if (!this->WorkingDirectory.empty()) {
cmsysProcess_SetWorkingDirectory(this->Process,
@ -101,7 +101,7 @@ public:
{
cmsysProcess_SetPipeFile(this->Process, cmsysProcess_Pipe_STDERR, fname);
}
int WaitForExit(double* timeout = 0)
int WaitForExit(double* timeout = CM_NULLPTR)
{
this->PipeState = cmsysProcess_WaitForExit(this->Process, timeout);
return this->PipeState;
@ -1781,7 +1781,7 @@ const char* bullseyeHelp[] = {
" condition evaluated true or false, respectively.",
" * A k indicates a constant decision or condition.",
" * The slash / means this probe is excluded from summary results. ",
0
CM_NULLPTR
};
}
@ -1809,7 +1809,7 @@ int cmCTestCoverageHandler::RunBullseyeCoverageBranch(
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
"run covbr: " << std::endl, this->Quiet);
if (!this->RunBullseyeCommand(cont, "covbr", 0, outputFile)) {
if (!this->RunBullseyeCommand(cont, "covbr", CM_NULLPTR, outputFile)) {
cmCTestLog(this->CTest, ERROR_MESSAGE, "error running covbr for."
<< "\n");
return -1;
@ -1882,7 +1882,7 @@ int cmCTestCoverageHandler::RunBullseyeCoverageBranch(
covLogXML.StartElement("Report");
// write the bullseye header
line = 0;
for (int k = 0; bullseyeHelp[k] != 0; ++k) {
for (int k = 0; bullseyeHelp[k] != CM_NULLPTR; ++k) {
covLogXML.StartElement("Line");
covLogXML.Attribute("Number", line);
covLogXML.Attribute("Count", -1);

View File

@ -45,16 +45,16 @@ public:
/*
* The main entry point for this class
*/
int ProcessHandler();
int ProcessHandler() CM_OVERRIDE;
cmCTestCoverageHandler();
virtual void Initialize();
void Initialize() CM_OVERRIDE;
/**
* This method is called when reading CTest custom file
*/
void PopulateCustomVectors(cmMakefile* mf);
void PopulateCustomVectors(cmMakefile* mf) CM_OVERRIDE;
/** Report coverage only for sources with these labels. */
void SetLabelFilter(std::set<std::string> const& labels);

View File

@ -147,7 +147,7 @@ bool cmCTestCurl::UploadFile(std::string const& local_file,
::curl_easy_setopt(this->Curl, CURLOPT_DEBUGFUNCTION, curlDebugCallback);
// Be sure to set Content-Type to satisfy fussy modsecurity rules
struct curl_slist* headers =
::curl_slist_append(NULL, "Content-Type: text/xml");
::curl_slist_append(CM_NULLPTR, "Content-Type: text/xml");
::curl_easy_setopt(this->Curl, CURLOPT_HTTPHEADER, headers);
std::vector<char> responseData;
std::vector<char> debugData;

View File

@ -28,7 +28,7 @@ public:
/**
* This is a virtual constructor for the command.
*/
virtual cmCommand* Clone()
cmCommand* Clone() CM_OVERRIDE
{
cmCTestEmptyBinaryDirectoryCommand* ni =
new cmCTestEmptyBinaryDirectoryCommand;
@ -41,13 +41,13 @@ public:
* This is called when the command is first encountered in
* the CMakeLists.txt file.
*/
virtual bool InitialPass(std::vector<std::string> const& args,
cmExecutionStatus& status);
bool InitialPass(std::vector<std::string> const& args,
cmExecutionStatus& status) CM_OVERRIDE;
/**
* The name of the command as specified in CMakeList.txt.
*/
virtual std::string GetName() const
std::string GetName() const CM_OVERRIDE
{
return "ctest_empty_binary_directory";
}

View File

@ -64,7 +64,8 @@ std::string cmCTestGIT::GetWorkingRevision()
{
// Run plumbing "git rev-list" to get work tree revision.
const char* git = this->CommandLineTool.c_str();
const char* git_rev_list[] = { git, "rev-list", "-n", "1", "HEAD", "--", 0 };
const char* git_rev_list[] = { git, "rev-list", "-n", "1",
"HEAD", "--", CM_NULLPTR };
std::string rev;
OneLineParser out(this, "rl-out> ", rev);
OutputLogger err(this->Log, "rl-err> ");
@ -93,7 +94,7 @@ std::string cmCTestGIT::FindGitDir()
// Run "git rev-parse --git-dir" to locate the real .git directory.
const char* git = this->CommandLineTool.c_str();
char const* git_rev_parse[] = { git, "rev-parse", "--git-dir", 0 };
char const* git_rev_parse[] = { git, "rev-parse", "--git-dir", CM_NULLPTR };
std::string git_dir_line;
OneLineParser rev_parse_out(this, "rev-parse-out> ", git_dir_line);
OutputLogger rev_parse_err(this->Log, "rev-parse-err> ");
@ -135,7 +136,8 @@ std::string cmCTestGIT::FindTopDir()
// Run "git rev-parse --show-cdup" to locate the top of the tree.
const char* git = this->CommandLineTool.c_str();
char const* git_rev_parse[] = { git, "rev-parse", "--show-cdup", 0 };
char const* git_rev_parse[] = { git, "rev-parse", "--show-cdup",
CM_NULLPTR };
std::string cdup;
OneLineParser rev_parse_out(this, "rev-parse-out> ", cdup);
OutputLogger rev_parse_err(this->Log, "rev-parse-err> ");
@ -169,7 +171,7 @@ bool cmCTestGIT::UpdateByFetchAndReset()
}
// Sentinel argument.
git_fetch.push_back(0);
git_fetch.push_back(CM_NULLPTR);
// Fetch upstream refs.
OutputLogger fetch_out(this->Log, "fetch-out> ");
@ -204,7 +206,8 @@ bool cmCTestGIT::UpdateByFetchAndReset()
}
// Reset the local branch to point at that tracked from upstream.
char const* git_reset[] = { git, "reset", "--hard", sha1.c_str(), 0 };
char const* git_reset[] = { git, "reset", "--hard", sha1.c_str(),
CM_NULLPTR };
OutputLogger reset_out(this->Log, "reset-out> ");
OutputLogger reset_err(this->Log, "reset-err> ");
return this->RunChild(&git_reset[0], &reset_out, &reset_err);
@ -219,7 +222,7 @@ bool cmCTestGIT::UpdateByCustom(std::string const& custom)
i != git_custom_command.end(); ++i) {
git_custom.push_back(i->c_str());
}
git_custom.push_back(0);
git_custom.push_back(CM_NULLPTR);
OutputLogger custom_out(this->Log, "custom-out> ");
OutputLogger custom_err(this->Log, "custom-err> ");
@ -248,7 +251,7 @@ bool cmCTestGIT::UpdateImpl()
// Git < 1.6.5 did not support submodule --recursive
if (this->GetGitVersion() < cmCTestGITVersion(1, 6, 5, 0)) {
recursive = 0;
recursive = CM_NULLPTR;
// No need to require >= 1.6.5 if there are no submodules.
if (cmSystemTools::FileExists((top_dir + "/.gitmodules").c_str())) {
this->Log << "Git < 1.6.5 cannot update submodules recursively\n";
@ -257,7 +260,7 @@ bool cmCTestGIT::UpdateImpl()
// Git < 1.8.1 did not support sync --recursive
if (this->GetGitVersion() < cmCTestGITVersion(1, 8, 1, 0)) {
sync_recursive = 0;
sync_recursive = CM_NULLPTR;
// No need to require >= 1.8.1 if there are no submodules.
if (cmSystemTools::FileExists((top_dir + "/.gitmodules").c_str())) {
this->Log << "Git < 1.8.1 cannot synchronize submodules recursively\n";
@ -272,7 +275,8 @@ bool cmCTestGIT::UpdateImpl()
std::string init_submodules =
this->CTest->GetCTestConfiguration("GITInitSubmodules");
if (cmSystemTools::IsOn(init_submodules.c_str())) {
char const* git_submodule_init[] = { git, "submodule", "init", 0 };
char const* git_submodule_init[] = { git, "submodule", "init",
CM_NULLPTR };
ret = this->RunChild(git_submodule_init, &submodule_out, &submodule_err,
top_dir.c_str());
@ -282,7 +286,7 @@ bool cmCTestGIT::UpdateImpl()
}
char const* git_submodule_sync[] = { git, "submodule", "sync",
sync_recursive, 0 };
sync_recursive, CM_NULLPTR };
ret = this->RunChild(git_submodule_sync, &submodule_out, &submodule_err,
top_dir.c_str());
@ -290,7 +294,8 @@ bool cmCTestGIT::UpdateImpl()
return false;
}
char const* git_submodule[] = { git, "submodule", "update", recursive, 0 };
char const* git_submodule[] = { git, "submodule", "update", recursive,
CM_NULLPTR };
return this->RunChild(git_submodule, &submodule_out, &submodule_err,
top_dir.c_str());
}
@ -299,7 +304,7 @@ unsigned int cmCTestGIT::GetGitVersion()
{
if (!this->CurrentGitVersion) {
const char* git = this->CommandLineTool.c_str();
char const* git_version[] = { git, "--version", 0 };
char const* git_version[] = { git, "--version", CM_NULLPTR };
std::string version;
OneLineParser version_out(this, "version-out> ", version);
OutputLogger version_err(this->Log, "version-err> ");
@ -611,10 +616,10 @@ void cmCTestGIT::LoadRevisions()
std::string range = this->OldRevision + ".." + this->NewRevision;
const char* git = this->CommandLineTool.c_str();
const char* git_rev_list[] = { git, "rev-list", "--reverse",
range.c_str(), "--", 0 };
range.c_str(), "--", CM_NULLPTR };
const char* git_diff_tree[] = {
git, "diff-tree", "--stdin", "--always", "-z",
"-r", "--pretty=raw", "--encoding=utf-8", 0
"-r", "--pretty=raw", "--encoding=utf-8", CM_NULLPTR
};
this->Log << this->ComputeCommandLine(git_rev_list) << " | "
<< this->ComputeCommandLine(git_diff_tree) << "\n";
@ -639,13 +644,15 @@ void cmCTestGIT::LoadModifications()
const char* git = this->CommandLineTool.c_str();
// Use 'git update-index' to refresh the index w.r.t. the work tree.
const char* git_update_index[] = { git, "update-index", "--refresh", 0 };
const char* git_update_index[] = { git, "update-index", "--refresh",
CM_NULLPTR };
OutputLogger ui_out(this->Log, "ui-out> ");
OutputLogger ui_err(this->Log, "ui-err> ");
this->RunChild(git_update_index, &ui_out, &ui_err);
// Use 'git diff-index' to get modified files.
const char* git_diff_index[] = { git, "diff-index", "-z", "HEAD", "--", 0 };
const char* git_diff_index[] = { git, "diff-index", "-z",
"HEAD", "--", CM_NULLPTR };
DiffParser out(this, "di-out> ");
OutputLogger err(this->Log, "di-err> ");
this->RunChild(git_diff_index, &out, &err);

View File

@ -24,15 +24,15 @@ public:
/** Construct with a CTest instance and update log stream. */
cmCTestGIT(cmCTest* ctest, std::ostream& log);
virtual ~cmCTestGIT();
~cmCTestGIT() CM_OVERRIDE;
private:
unsigned int CurrentGitVersion;
unsigned int GetGitVersion();
std::string GetWorkingRevision();
virtual void NoteOldRevision();
virtual void NoteNewRevision();
virtual bool UpdateImpl();
void NoteOldRevision() CM_OVERRIDE;
void NoteNewRevision() CM_OVERRIDE;
bool UpdateImpl() CM_OVERRIDE;
std::string FindGitDir();
std::string FindTopDir();
@ -41,8 +41,8 @@ private:
bool UpdateByCustom(std::string const& custom);
bool UpdateInternal();
void LoadRevisions();
void LoadModifications();
void LoadRevisions() CM_OVERRIDE;
void LoadModifications() CM_OVERRIDE;
// "public" needed by older Sun compilers
public:

View File

@ -19,7 +19,7 @@
cmCTestGenericHandler::cmCTestGenericHandler()
{
this->HandlerVerbose = cmSystemTools::OUTPUT_NONE;
this->CTest = 0;
this->CTest = CM_NULLPTR;
this->SubmitIndex = 0;
this->AppendXML = false;
this->Quiet = false;
@ -77,7 +77,7 @@ const char* cmCTestGenericHandler::GetOption(const std::string& op)
cmCTestGenericHandler::t_StringToString::iterator remit =
this->Options.find(op);
if (remit == this->Options.end()) {
return 0;
return CM_NULLPTR;
}
return remit->second.c_str();
}

View File

@ -74,7 +74,7 @@ public:
* Construct handler
*/
cmCTestGenericHandler();
virtual ~cmCTestGenericHandler();
~cmCTestGenericHandler() CM_OVERRIDE;
typedef std::map<std::string, std::string> t_StringToString;

View File

@ -26,11 +26,11 @@ public:
/** Construct with a CTest instance and update log stream. */
cmCTestGlobalVC(cmCTest* ctest, std::ostream& log);
virtual ~cmCTestGlobalVC();
~cmCTestGlobalVC() CM_OVERRIDE;
protected:
// Implement cmCTestVC internal API.
virtual bool WriteXMLUpdates(cmXMLWriter& xml);
bool WriteXMLUpdates(cmXMLWriter& xml) CM_OVERRIDE;
/** Represent a vcs-reported action for one path in a revision. */
struct Change

View File

@ -101,7 +101,7 @@ std::string cmCTestHG::GetWorkingRevision()
{
// Run plumbing "hg identify" to get work tree revision.
const char* hg = this->CommandLineTool.c_str();
const char* hg_identify[] = { hg, "identify", "-i", 0 };
const char* hg_identify[] = { hg, "identify", "-i", CM_NULLPTR };
std::string rev;
IdentifyParser out(this, "rev-out> ", rev);
OutputLogger err(this->Log, "rev-err> ");
@ -129,7 +129,7 @@ bool cmCTestHG::UpdateImpl()
// Use "hg pull" followed by "hg update" to update the working tree.
{
const char* hg = this->CommandLineTool.c_str();
const char* hg_pull[] = { hg, "pull", "-v", 0 };
const char* hg_pull[] = { hg, "pull", "-v", CM_NULLPTR };
OutputLogger out(this->Log, "pull-out> ");
OutputLogger err(this->Log, "pull-err> ");
this->RunChild(&hg_pull[0], &out, &err);
@ -154,7 +154,7 @@ bool cmCTestHG::UpdateImpl()
}
// Sentinel argument.
hg_update.push_back(0);
hg_update.push_back(CM_NULLPTR);
OutputLogger out(this->Log, "update-out> ");
OutputLogger err(this->Log, "update-err> ");
@ -171,7 +171,7 @@ public:
{
this->InitializeParser();
}
~LogParser() { this->CleanupParser(); }
~LogParser() CM_OVERRIDE { this->CleanupParser(); }
private:
cmCTestHG* HG;
@ -288,7 +288,8 @@ void cmCTestHG::LoadRevisions()
" <file_dels>{file_dels}</file_dels>\n"
"</logentry>\n";
const char* hg_log[] = {
hg, "log", "--removed", "-r", range.c_str(), "--template", hgXMLTemplate, 0
hg, "log", "--removed", "-r", range.c_str(),
"--template", hgXMLTemplate, CM_NULLPTR
};
LogParser out(this, "log-out> ");
@ -303,7 +304,7 @@ void cmCTestHG::LoadModifications()
{
// Use 'hg status' to get modified files.
const char* hg = this->CommandLineTool.c_str();
const char* hg_status[] = { hg, "status", 0 };
const char* hg_status[] = { hg, "status", CM_NULLPTR };
StatusParser out(this, "status-out> ");
OutputLogger err(this->Log, "status-err> ");
this->RunChild(hg_status, &out, &err);

View File

@ -24,16 +24,16 @@ public:
/** Construct with a CTest instance and update log stream. */
cmCTestHG(cmCTest* ctest, std::ostream& log);
virtual ~cmCTestHG();
~cmCTestHG() CM_OVERRIDE;
private:
std::string GetWorkingRevision();
virtual void NoteOldRevision();
virtual void NoteNewRevision();
virtual bool UpdateImpl();
void NoteOldRevision() CM_OVERRIDE;
void NoteNewRevision() CM_OVERRIDE;
bool UpdateImpl() CM_OVERRIDE;
void LoadRevisions();
void LoadModifications();
void LoadRevisions() CM_OVERRIDE;
void LoadModifications() CM_OVERRIDE;
// Parsing helper classes.
class IdentifyParser;

View File

@ -20,7 +20,7 @@ cmCTestHandlerCommand::cmCTestHandlerCommand()
size_t cc;
this->Arguments.reserve(INIT_SIZE);
for (cc = 0; cc < INIT_SIZE; ++cc) {
this->Arguments.push_back(0);
this->Arguments.push_back(CM_NULLPTR);
}
this->Arguments[ct_RETURN_VALUE] = "RETURN_VALUE";
this->Arguments[ct_SOURCE] = "SOURCE";
@ -36,7 +36,7 @@ bool cmCTestHandlerCommand::InitialPass(std::vector<std::string> const& args,
{
// Allocate space for argument values.
this->Values.clear();
this->Values.resize(this->Last, 0);
this->Values.resize(this->Last, CM_NULLPTR);
// Process input arguments.
this->ArgumentDoing = ArgumentDoingNone;

View File

@ -30,8 +30,8 @@ public:
* This is called when the command is first encountered in
* the CMakeLists.txt file.
*/
virtual bool InitialPass(std::vector<std::string> const& args,
cmExecutionStatus& status);
bool InitialPass(std::vector<std::string> const& args,
cmExecutionStatus& status) CM_OVERRIDE;
cmTypeMacro(cmCTestHandlerCommand, cmCTestCommand);

View File

@ -30,7 +30,7 @@
cmCTestLaunch::cmCTestLaunch(int argc, const char* const* argv)
{
this->Passthru = true;
this->Process = 0;
this->Process = CM_NULLPTR;
this->ExitCode = 1;
this->CWD = cmSystemTools::GetCurrentWorkingDirectory();
@ -128,7 +128,7 @@ bool cmCTestLaunch::ParseArguments(int argc, const char* const* argv)
return true;
} else {
this->RealArgC = 0;
this->RealArgV = 0;
this->RealArgV = CM_NULLPTR;
std::cerr << "No launch/command separator ('--') found!\n";
return false;
}
@ -227,9 +227,9 @@ void cmCTestLaunch::RunChild()
// Record child stdout and stderr if necessary.
if (!this->Passthru) {
char* data = 0;
char* data = CM_NULLPTR;
int length = 0;
while (int p = cmsysProcess_WaitForData(cp, &data, &length, 0)) {
while (int p = cmsysProcess_WaitForData(cp, &data, &length, CM_NULLPTR)) {
if (p == cmsysProcess_Pipe_STDOUT) {
fout.write(data, length);
std::cout.write(data, length);
@ -243,7 +243,7 @@ void cmCTestLaunch::RunChild()
}
// Wait for the real command to finish.
cmsysProcess_WaitForExit(cp, 0);
cmsysProcess_WaitForExit(cp, CM_NULLPTR);
this->ExitCode = cmsysProcess_GetExitValue(cp);
}
@ -384,7 +384,7 @@ void cmCTestLaunch::WriteXMLAction(cmXMLWriter& xml)
}
// OutputType
const char* outputType = 0;
const char* outputType = CM_NULLPTR;
if (!this->OptionTargetType.empty()) {
if (this->OptionTargetType == "EXECUTABLE") {
outputType = "executable";

View File

@ -29,7 +29,7 @@ public:
/**
* This is a virtual constructor for the command.
*/
virtual cmCommand* Clone()
cmCommand* Clone() CM_OVERRIDE
{
cmCTestMemCheckCommand* ni = new cmCTestMemCheckCommand;
ni->CTest = this->CTest;
@ -40,12 +40,12 @@ public:
/**
* The name of the command as specified in CMakeList.txt.
*/
virtual std::string GetName() const { return "ctest_memcheck"; }
std::string GetName() const CM_OVERRIDE { return "ctest_memcheck"; }
cmTypeMacro(cmCTestMemCheckCommand, cmCTestTestCommand);
protected:
cmCTestGenericHandler* InitializeActualHandler();
cmCTestGenericHandler* InitializeActualHandler() CM_OVERRIDE;
};
#endif

View File

@ -42,7 +42,7 @@ static CatToErrorType cmCTestMemCheckBoundsChecker[] = {
{ "Allocation Conflict", cmCTestMemCheckHandler::FMM },
{ "Bad Pointer Use", cmCTestMemCheckHandler::FMW },
{ "Dangling Pointer", cmCTestMemCheckHandler::FMR },
{ 0, 0 }
{ CM_NULLPTR, 0 }
};
static void xmlReportError(int line, const char* msg, void* data)
@ -72,7 +72,7 @@ public:
std::ostringstream ostr;
ostr << name << ":\n";
int i = 0;
for (; atts[i] != 0; i += 2) {
for (; atts[i] != CM_NULLPTR; i += 2) {
ostr << " " << atts[i] << " - " << atts[i + 1] << "\n";
}
ostr << "\n";
@ -83,12 +83,12 @@ public:
const char* GetAttribute(const char* name, const char** atts)
{
int i = 0;
for (; atts[i] != 0; ++i) {
for (; atts[i] != CM_NULLPTR; ++i) {
if (strcmp(name, atts[i]) == 0) {
return atts[i + 1];
}
}
return 0;
return CM_NULLPTR;
}
void ParseError(const char** atts)
{
@ -241,9 +241,9 @@ void cmCTestMemCheckHandler::InitializeResultsVectors()
// define the standard set of errors
//----------------------------------------------------------------------
static const char* cmCTestMemCheckResultStrings[] = {
"ABR", "ABW", "ABWL", "COR", "EXU", "FFM", "FIM", "FMM",
"FMR", "FMW", "FUM", "IPR", "IPW", "MAF", "MLK", "MPK",
"NPR", "ODS", "PAR", "PLK", "UMC", "UMR", 0
"ABR", "ABW", "ABWL", "COR", "EXU", "FFM", "FIM", "FMM",
"FMR", "FMW", "FUM", "IPR", "IPW", "MAF", "MLK", "MPK",
"NPR", "ODS", "PAR", "PLK", "UMC", "UMR", CM_NULLPTR
};
static const char* cmCTestMemCheckResultLongStrings[] = {
"Threading Problem",
@ -268,10 +268,10 @@ void cmCTestMemCheckHandler::InitializeResultsVectors()
"PLK",
"Uninitialized Memory Conditional",
"Uninitialized Memory Read",
0
CM_NULLPTR
};
this->GlobalResults.clear();
for (int i = 0; cmCTestMemCheckResultStrings[i] != 0; ++i) {
for (int i = 0; cmCTestMemCheckResultStrings[i] != CM_NULLPTR; ++i) {
this->ResultStrings.push_back(cmCTestMemCheckResultStrings[i]);
this->ResultStringsLong.push_back(cmCTestMemCheckResultLongStrings[i]);
this->GlobalResults.push_back(0);

View File

@ -33,16 +33,17 @@ class cmCTestMemCheckHandler : public cmCTestTestHandler
public:
cmTypeMacro(cmCTestMemCheckHandler, cmCTestTestHandler);
void PopulateCustomVectors(cmMakefile* mf);
void PopulateCustomVectors(cmMakefile* mf) CM_OVERRIDE;
cmCTestMemCheckHandler();
void Initialize();
void Initialize() CM_OVERRIDE;
protected:
virtual int PreProcessHandler();
virtual int PostProcessHandler();
virtual void GenerateTestCommand(std::vector<std::string>& args, int test);
int PreProcessHandler() CM_OVERRIDE;
int PostProcessHandler() CM_OVERRIDE;
void GenerateTestCommand(std::vector<std::string>& args,
int test) CM_OVERRIDE;
private:
enum
@ -125,7 +126,7 @@ private:
/**
* Generate the Dart compatible output
*/
void GenerateDartOutput(cmXMLWriter& xml);
void GenerateDartOutput(cmXMLWriter& xml) CM_OVERRIDE;
std::vector<std::string> CustomPreMemCheck;
std::vector<std::string> CustomPostMemCheck;

View File

@ -163,7 +163,7 @@ cmCTestP4::User cmCTestP4::GetUserData(const std::string& username)
p4_users.push_back("-m");
p4_users.push_back("1");
p4_users.push_back(username.c_str());
p4_users.push_back(0);
p4_users.push_back(CM_NULLPTR);
UserParser out(this, "users-out> ");
OutputLogger err(this->Log, "users-err> ");
@ -358,7 +358,7 @@ std::string cmCTestP4::GetWorkingRevision()
std::string source = this->SourceDirectory + "/...#have";
p4_identify.push_back(source.c_str());
p4_identify.push_back(0);
p4_identify.push_back(CM_NULLPTR);
std::string rev;
IdentifyParser out(this, "p4_changes-out> ", rev);
@ -418,7 +418,7 @@ void cmCTestP4::LoadRevisions()
p4_changes.push_back("changes");
p4_changes.push_back(range.c_str());
p4_changes.push_back(0);
p4_changes.push_back(CM_NULLPTR);
ChangesParser out(this, "p4_changes-out> ");
OutputLogger err(this->Log, "p4_changes-err> ");
@ -438,7 +438,7 @@ void cmCTestP4::LoadRevisions()
p4_describe.push_back("describe");
p4_describe.push_back("-s");
p4_describe.push_back(i->c_str());
p4_describe.push_back(0);
p4_describe.push_back(CM_NULLPTR);
DescribeParser outDescribe(this, "p4_describe-out> ");
OutputLogger errDescribe(this->Log, "p4_describe-err> ");
@ -457,7 +457,7 @@ void cmCTestP4::LoadModifications()
p4_diff.push_back("-dn");
std::string source = this->SourceDirectory + "/...";
p4_diff.push_back(source.c_str());
p4_diff.push_back(0);
p4_diff.push_back(CM_NULLPTR);
DiffParser out(this, "p4_diff-out> ");
OutputLogger err(this->Log, "p4_diff-err> ");
@ -474,7 +474,7 @@ bool cmCTestP4::UpdateCustom(const std::string& custom)
i != p4_custom_command.end(); ++i) {
p4_custom.push_back(i->c_str());
}
p4_custom.push_back(0);
p4_custom.push_back(CM_NULLPTR);
OutputLogger custom_out(this->Log, "p4_customsync-out> ");
OutputLogger custom_err(this->Log, "p4_customsync-err> ");
@ -525,7 +525,7 @@ bool cmCTestP4::UpdateImpl()
}
p4_sync.push_back(source.c_str());
p4_sync.push_back(0);
p4_sync.push_back(CM_NULLPTR);
OutputLogger out(this->Log, "p4_sync-out> ");
OutputLogger err(this->Log, "p4_sync-err> ");

View File

@ -27,7 +27,7 @@ public:
/** Construct with a CTest instance and update log stream. */
cmCTestP4(cmCTest* ctest, std::ostream& log);
virtual ~cmCTestP4();
~cmCTestP4() CM_OVERRIDE;
private:
std::vector<std::string> ChangeLists;
@ -54,13 +54,13 @@ private:
void SetP4Options(std::vector<char const*>& options);
std::string GetWorkingRevision();
virtual void NoteOldRevision();
virtual void NoteNewRevision();
virtual bool UpdateImpl();
void NoteOldRevision() CM_OVERRIDE;
void NoteNewRevision() CM_OVERRIDE;
bool UpdateImpl() CM_OVERRIDE;
bool UpdateCustom(const std::string& custom);
void LoadRevisions();
void LoadModifications();
void LoadRevisions() CM_OVERRIDE;
void LoadModifications() CM_OVERRIDE;
// Parsing helper classes.
class IdentifyParser;

View File

@ -28,7 +28,7 @@ public:
/**
* This is a virtual constructor for the command.
*/
virtual cmCommand* Clone()
cmCommand* Clone() CM_OVERRIDE
{
cmCTestReadCustomFilesCommand* ni = new cmCTestReadCustomFilesCommand;
ni->CTest = this->CTest;
@ -39,13 +39,13 @@ public:
* This is called when the command is first encountered in
* the CMakeLists.txt file.
*/
virtual bool InitialPass(std::vector<std::string> const& args,
cmExecutionStatus& status);
bool InitialPass(std::vector<std::string> const& args,
cmExecutionStatus& status) CM_OVERRIDE;
/**
* The name of the command as specified in CMakeList.txt.
*/
virtual std::string GetName() const { return "ctest_read_custom_files"; }
std::string GetName() const CM_OVERRIDE { return "ctest_read_custom_files"; }
cmTypeMacro(cmCTestReadCustomFilesCommand, cmCTestCommand);
};

View File

@ -28,7 +28,7 @@ public:
/**
* This is a virtual constructor for the command.
*/
virtual cmCommand* Clone()
cmCommand* Clone() CM_OVERRIDE
{
cmCTestRunScriptCommand* ni = new cmCTestRunScriptCommand;
ni->CTest = this->CTest;
@ -40,13 +40,13 @@ public:
* This is called when the command is first encountered in
* the CMakeLists.txt file.
*/
virtual bool InitialPass(std::vector<std::string> const& args,
cmExecutionStatus& status);
bool InitialPass(std::vector<std::string> const& args,
cmExecutionStatus& status) CM_OVERRIDE;
/**
* The name of the command as specified in CMakeList.txt.
*/
virtual std::string GetName() const { return "ctest_run_script"; }
std::string GetName() const CM_OVERRIDE { return "ctest_run_script"; }
cmTypeMacro(cmCTestRunScriptCommand, cmCTestCommand);
};

View File

@ -24,12 +24,12 @@ cmCTestRunTest::cmCTestRunTest(cmCTestTestHandler* handler)
{
this->CTest = handler->CTest;
this->TestHandler = handler;
this->TestProcess = 0;
this->TestProcess = CM_NULLPTR;
this->TestResult.ExecutionTime = 0;
this->TestResult.ReturnValue = 0;
this->TestResult.Status = cmCTestTestHandler::NOT_RUN;
this->TestResult.TestCount = 0;
this->TestResult.Properties = 0;
this->TestResult.Properties = CM_NULLPTR;
this->ProcessOutput = "";
this->CompressedOutput = "";
this->CompressionRatio = 2;
@ -577,7 +577,7 @@ double cmCTestRunTest::ResolveTimeout()
return timeout;
}
struct tm* lctime;
time_t current_time = time(0);
time_t current_time = time(CM_NULLPTR);
lctime = gmtime(&current_time);
int gm_hour = lctime->tm_hour;
time_t gm_time = mktime(lctime);

View File

@ -291,7 +291,7 @@ bool cmCTestSVN::RunSVNCommand(std::vector<char const*> const& parameters,
args.push_back(i->c_str());
}
args.push_back(0);
args.push_back(CM_NULLPTR);
if (strcmp(parameters[0], "update") == 0) {
return RunUpdateCommand(&args[0], out, err);
@ -311,7 +311,7 @@ public:
{
this->InitializeParser();
}
~LogParser() { this->CleanupParser(); }
~LogParser() CM_OVERRIDE { this->CleanupParser(); }
private:
cmCTestSVN* SVN;
cmCTestSVN::SVNInfo& SVNRepo;

View File

@ -26,14 +26,14 @@ public:
/** Construct with a CTest instance and update log stream. */
cmCTestSVN(cmCTest* ctest, std::ostream& log);
virtual ~cmCTestSVN();
~cmCTestSVN() CM_OVERRIDE;
private:
// Implement cmCTestVC internal API.
virtual void CleanupImpl();
virtual void NoteOldRevision();
virtual void NoteNewRevision();
virtual bool UpdateImpl();
void CleanupImpl() CM_OVERRIDE;
void NoteOldRevision() CM_OVERRIDE;
void NoteNewRevision() CM_OVERRIDE;
bool UpdateImpl() CM_OVERRIDE;
bool RunSVNCommand(std::vector<char const*> const& parameters,
OutputParser* out, OutputParser* err);
@ -78,8 +78,8 @@ private:
std::string LoadInfo(SVNInfo& svninfo);
void LoadExternals();
void LoadModifications();
void LoadRevisions();
void LoadModifications() CM_OVERRIDE;
void LoadRevisions() CM_OVERRIDE;
void LoadRevisions(SVNInfo& svninfo);
void GuessBase(SVNInfo& svninfo, std::vector<Change> const& changes);
@ -87,7 +87,7 @@ private:
void DoRevisionSVN(Revision const& revision,
std::vector<Change> const& changes);
void WriteXMLGlobal(cmXMLWriter& xml);
void WriteXMLGlobal(cmXMLWriter& xml) CM_OVERRIDE;
// Parsing helper classes.
class InfoParser;

View File

@ -59,7 +59,7 @@ class cmCTestScriptFunctionBlocker : public cmFunctionBlocker
{
public:
cmCTestScriptFunctionBlocker() {}
virtual ~cmCTestScriptFunctionBlocker() {}
~cmCTestScriptFunctionBlocker() CM_OVERRIDE {}
bool IsFunctionBlocked(const cmListFileFunction& lff, cmMakefile& mf,
cmExecutionStatus&) CM_OVERRIDE;
// virtual bool ShouldRemove(const cmListFileFunction& lff, cmMakefile &mf);
@ -82,9 +82,9 @@ cmCTestScriptHandler::cmCTestScriptHandler()
this->Backup = false;
this->EmptyBinDir = false;
this->EmptyBinDirOnce = false;
this->Makefile = 0;
this->CMake = 0;
this->GlobalGenerator = 0;
this->Makefile = CM_NULLPTR;
this->CMake = CM_NULLPTR;
this->GlobalGenerator = CM_NULLPTR;
this->ScriptStartTime = 0;
@ -121,10 +121,10 @@ void cmCTestScriptHandler::Initialize()
this->ScriptStartTime = 0;
delete this->Makefile;
this->Makefile = 0;
this->Makefile = CM_NULLPTR;
delete this->GlobalGenerator;
this->GlobalGenerator = 0;
this->GlobalGenerator = CM_NULLPTR;
delete this->CMake;
}
@ -200,7 +200,7 @@ int cmCTestScriptHandler::ExecuteScript(const std::string& total_script_arg)
for (size_t i = 1; i < initArgs.size(); ++i) {
argv.push_back(initArgs[i].c_str());
}
argv.push_back(0);
argv.push_back(CM_NULLPTR);
// Now create process object
cmsysProcess* cp = cmsysProcess_New();
@ -226,7 +226,7 @@ int cmCTestScriptHandler::ExecuteScript(const std::string& total_script_arg)
}
// Properly handle output of the build command
cmsysProcess_WaitForExit(cp, 0);
cmsysProcess_WaitForExit(cp, CM_NULLPTR);
int result = cmsysProcess_GetState(cp);
int retVal = 0;
bool failed = false;
@ -863,7 +863,7 @@ bool cmCTestScriptHandler::WriteInitialCache(const char* directory,
return false;
}
if (text != 0) {
if (text != CM_NULLPTR) {
fout.write(text, strlen(text));
}

View File

@ -71,7 +71,7 @@ public:
/**
* Run a dashboard using a specified confiuration script
*/
int ProcessHandler();
int ProcessHandler() CM_OVERRIDE;
/*
* Run a script
@ -104,9 +104,9 @@ public:
double GetRemainingTimeAllowed();
cmCTestScriptHandler();
~cmCTestScriptHandler();
~cmCTestScriptHandler() CM_OVERRIDE;
void Initialize();
void Initialize() CM_OVERRIDE;
void CreateCMake();
cmake* GetCMake() { return this->CMake; }

View File

@ -28,7 +28,7 @@ public:
/**
* This is a virtual constructor for the command.
*/
virtual cmCommand* Clone()
cmCommand* Clone() CM_OVERRIDE
{
cmCTestSleepCommand* ni = new cmCTestSleepCommand;
ni->CTest = this->CTest;
@ -40,13 +40,13 @@ public:
* This is called when the command is first encountered in
* the CMakeLists.txt file.
*/
virtual bool InitialPass(std::vector<std::string> const& args,
cmExecutionStatus& status);
bool InitialPass(std::vector<std::string> const& args,
cmExecutionStatus& status) CM_OVERRIDE;
/**
* The name of the command as specified in CMakeList.txt.
*/
virtual std::string GetName() const { return "ctest_sleep"; }
std::string GetName() const CM_OVERRIDE { return "ctest_sleep"; }
cmTypeMacro(cmCTestSleepCommand, cmCTestCommand);
};

View File

@ -32,12 +32,12 @@ bool cmCTestStartCommand::InitialPass(std::vector<std::string> const& args,
size_t cnt = 0;
const char* smodel = args[cnt].c_str();
const char* src_dir = 0;
const char* bld_dir = 0;
const char* src_dir = CM_NULLPTR;
const char* bld_dir = CM_NULLPTR;
cnt++;
this->CTest->SetSpecificTrack(0);
this->CTest->SetSpecificTrack(CM_NULLPTR);
if (cnt < args.size() - 1) {
if (args[cnt] == "TRACK") {
cnt++;

View File

@ -27,7 +27,7 @@ public:
/**
* This is a virtual constructor for the command.
*/
virtual cmCommand* Clone()
cmCommand* Clone() CM_OVERRIDE
{
cmCTestStartCommand* ni = new cmCTestStartCommand;
ni->CTest = this->CTest;
@ -41,8 +41,8 @@ public:
* This is called when the command is first encountered in
* the CMakeLists.txt file.
*/
virtual bool InitialPass(std::vector<std::string> const& args,
cmExecutionStatus& status);
bool InitialPass(std::vector<std::string> const& args,
cmExecutionStatus& status) CM_OVERRIDE;
/**
* Will this invocation of ctest_start create a new TAG file?
@ -57,7 +57,7 @@ public:
/**
* The name of the command as specified in CMakeList.txt.
*/
virtual std::string GetName() const { return "ctest_start"; }
std::string GetName() const CM_OVERRIDE { return "ctest_start"; }
cmTypeMacro(cmCTestStartCommand, cmCTestCommand);

View File

@ -88,7 +88,7 @@ cmCTestGenericHandler* cmCTestSubmitCommand::InitializeHandler()
extraFiles.end());
if (!this->CTest->SubmitExtraFiles(newExtraFiles)) {
this->SetError("problem submitting extra files.");
return 0;
return CM_NULLPTR;
}
}
@ -96,7 +96,7 @@ cmCTestGenericHandler* cmCTestSubmitCommand::InitializeHandler()
this->CTest->GetInitializedHandler("submit");
if (!handler) {
this->SetError("internal CTest error. Cannot instantiate submit handler");
return 0;
return CM_NULLPTR;
}
// If no FILES or PARTS given, *all* PARTS are submitted by default.

View File

@ -38,7 +38,7 @@ public:
/**
* This is a virtual constructor for the command.
*/
virtual cmCommand* Clone()
cmCommand* Clone() CM_OVERRIDE
{
cmCTestSubmitCommand* ni = new cmCTestSubmitCommand;
ni->CTest = this->CTest;
@ -46,21 +46,21 @@ public:
return ni;
}
virtual bool InitialPass(std::vector<std::string> const& args,
cmExecutionStatus& status);
bool InitialPass(std::vector<std::string> const& args,
cmExecutionStatus& status) CM_OVERRIDE;
/**
* The name of the command as specified in CMakeList.txt.
*/
virtual std::string GetName() const { return "ctest_submit"; }
std::string GetName() const CM_OVERRIDE { return "ctest_submit"; }
cmTypeMacro(cmCTestSubmitCommand, cmCTestHandlerCommand);
protected:
cmCTestGenericHandler* InitializeHandler();
cmCTestGenericHandler* InitializeHandler() CM_OVERRIDE;
virtual bool CheckArgumentKeyword(std::string const& arg);
virtual bool CheckArgumentValue(std::string const& arg);
bool CheckArgumentKeyword(std::string const& arg) CM_OVERRIDE;
bool CheckArgumentValue(std::string const& arg) CM_OVERRIDE;
enum
{

View File

@ -41,7 +41,7 @@ class cmCTestSubmitHandler::ResponseParser : public cmXMLParser
{
public:
ResponseParser() { this->Status = STATUS_OK; }
~ResponseParser() {}
~ResponseParser() CM_OVERRIDE {}
public:
enum StatusType
@ -150,7 +150,7 @@ void cmCTestSubmitHandler::Initialize()
this->HTTPProxyAuth = "";
this->FTPProxy = "";
this->FTPProxyType = 0;
this->LogFile = 0;
this->LogFile = CM_NULLPTR;
this->Files.clear();
}
@ -308,7 +308,7 @@ bool cmCTestSubmitHandler::SubmitUsingHTTP(const std::string& localprefix,
FILE* ftpfile;
char error_buffer[1024];
struct curl_slist* headers =
::curl_slist_append(NULL, "Content-Type: text/xml");
::curl_slist_append(CM_NULLPTR, "Content-Type: text/xml");
/* In windows, this will init the winsock stuff */
::curl_global_init(CURL_GLOBAL_ALL);
@ -507,10 +507,10 @@ bool cmCTestSubmitHandler::SubmitUsingHTTP(const std::string& localprefix,
// If curl failed for any reason, or checksum fails, wait and retry
//
if (res != CURLE_OK || this->HasErrors) {
std::string retryDelay = this->GetOption("RetryDelay") == NULL
std::string retryDelay = this->GetOption("RetryDelay") == CM_NULLPTR
? ""
: this->GetOption("RetryDelay");
std::string retryCount = this->GetOption("RetryCount") == NULL
std::string retryCount = this->GetOption("RetryCount") == CM_NULLPTR
? ""
: this->GetOption("RetryCount");
@ -776,7 +776,7 @@ bool cmCTestSubmitHandler::SubmitUsingSCP(const std::string& scp_command,
argv.push_back(scp_command.c_str()); // Scp command
argv.push_back(scp_command.c_str()); // Dummy string for file
argv.push_back(scp_command.c_str()); // Dummy string for remote url
argv.push_back(0);
argv.push_back(CM_NULLPTR);
cmsysProcess* cp = cmsysProcess_New();
cmsysProcess_SetOption(cp, cmsysProcess_Option_HideWindow, 1);
@ -807,12 +807,12 @@ bool cmCTestSubmitHandler::SubmitUsingSCP(const std::string& scp_command,
char* data;
int length;
while (cmsysProcess_WaitForData(cp, &data, &length, 0)) {
while (cmsysProcess_WaitForData(cp, &data, &length, CM_NULLPTR)) {
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
cmCTestLogWrite(data, length), this->Quiet);
}
cmsysProcess_WaitForExit(cp, 0);
cmsysProcess_WaitForExit(cp, CM_NULLPTR);
int result = cmsysProcess_GetState(cp);

View File

@ -26,14 +26,14 @@ public:
cmTypeMacro(cmCTestSubmitHandler, cmCTestGenericHandler);
cmCTestSubmitHandler();
~cmCTestSubmitHandler() { this->LogFile = 0; }
~cmCTestSubmitHandler() CM_OVERRIDE { this->LogFile = CM_NULLPTR; }
/*
* The main entry point for this class
*/
int ProcessHandler();
int ProcessHandler() CM_OVERRIDE;
void Initialize();
void Initialize() CM_OVERRIDE;
/** Specify a set of parts (by name) to submit. */
void SelectParts(std::set<cmCTest::Part> const& parts);

View File

@ -27,7 +27,7 @@ cmCTestTestCommand::cmCTestTestCommand()
this->Arguments[ctt_SCHEDULE_RANDOM] = "SCHEDULE_RANDOM";
this->Arguments[ctt_STOP_TIME] = "STOP_TIME";
this->Arguments[ctt_TEST_LOAD] = "TEST_LOAD";
this->Arguments[ctt_LAST] = 0;
this->Arguments[ctt_LAST] = CM_NULLPTR;
this->Last = ctt_LAST;
}

View File

@ -27,7 +27,7 @@ public:
/**
* This is a virtual constructor for the command.
*/
virtual cmCommand* Clone()
cmCommand* Clone() CM_OVERRIDE
{
cmCTestTestCommand* ni = new cmCTestTestCommand;
ni->CTest = this->CTest;
@ -38,13 +38,13 @@ public:
/**
* The name of the command as specified in CMakeList.txt.
*/
virtual std::string GetName() const { return "ctest_test"; }
std::string GetName() const CM_OVERRIDE { return "ctest_test"; }
cmTypeMacro(cmCTestTestCommand, cmCTestHandlerCommand);
protected:
virtual cmCTestGenericHandler* InitializeActualHandler();
cmCTestGenericHandler* InitializeHandler();
cmCTestGenericHandler* InitializeHandler() CM_OVERRIDE;
enum
{

View File

@ -336,7 +336,7 @@ cmCTestTestHandler::cmCTestTestHandler()
this->MemCheck = false;
this->LogFile = 0;
this->LogFile = CM_NULLPTR;
// regex to detect <DartMeasurement>...</DartMeasurement>
this->DartStuff.compile("(<DartMeasurement.*/DartMeasurement[a-zA-Z]*>)");
@ -550,7 +550,7 @@ int cmCTestTestHandler::ProcessHandler()
cmCTestLog(this->CTest, ERROR_MESSAGE, "Cannot create "
<< (this->MemCheck ? "memory check" : "testing")
<< " XML file" << std::endl);
this->LogFile = 0;
this->LogFile = CM_NULLPTR;
return 1;
}
cmXMLWriter xml(xmlfile);
@ -558,15 +558,15 @@ int cmCTestTestHandler::ProcessHandler()
}
if (!this->PostProcessHandler()) {
this->LogFile = 0;
this->LogFile = CM_NULLPTR;
return -1;
}
if (!failed.empty()) {
this->LogFile = 0;
this->LogFile = CM_NULLPTR;
return -1;
}
this->LogFile = 0;
this->LogFile = CM_NULLPTR;
return 0;
}
@ -936,7 +936,7 @@ void cmCTestTestHandler::ProcessDirectory(std::vector<std::string>& passed,
bool randomSchedule = this->CTest->GetScheduleType() == "Random";
if (randomSchedule) {
srand((unsigned)time(0));
srand((unsigned)time(CM_NULLPTR));
}
for (ListOfTests::iterator it = this->TestList.begin();
@ -1154,7 +1154,8 @@ int cmCTestTestHandler::ExecuteCommands(std::vector<std::string>& vec)
int retVal = 0;
cmCTestOptionalLog(this->CTest, HANDLER_VERBOSE_OUTPUT,
"Run command: " << *it << std::endl, this->Quiet);
if (!cmSystemTools::RunSingleCommand(it->c_str(), 0, 0, &retVal, 0,
if (!cmSystemTools::RunSingleCommand(it->c_str(), CM_NULLPTR, CM_NULLPTR,
&retVal, CM_NULLPTR,
cmSystemTools::OUTPUT_MERGE
/*this->Verbose*/) ||
retVal != 0) {

View File

@ -36,7 +36,7 @@ public:
/**
* The main entry point for this class
*/
int ProcessHandler();
int ProcessHandler() CM_OVERRIDE;
/**
* When both -R and -I are used should te resulting test list be the
@ -54,7 +54,7 @@ public:
/**
* This method is called when reading CTest custom file
*/
void PopulateCustomVectors(cmMakefile* mf);
void PopulateCustomVectors(cmMakefile* mf) CM_OVERRIDE;
///! Control the use of the regular expresisons, call these methods to turn
/// them on
@ -90,7 +90,7 @@ public:
*/
bool SetTestsProperties(const std::vector<std::string>& args);
void Initialize();
void Initialize() CM_OVERRIDE;
// NOTE: This struct is Saved/Restored
// in cmCTestTestHandler, if you add to this class

View File

@ -83,12 +83,12 @@ cmCTestGenericHandler* cmCTestUpdateCommand::InitializeHandler()
this->CTest->GetInitializedHandler("update");
if (!handler) {
this->SetError("internal CTest error. Cannot instantiate update handler");
return 0;
return CM_NULLPTR;
}
handler->SetCommand(this);
if (source_dir.empty()) {
this->SetError("source directory not specified. Please use SOURCE tag");
return 0;
return CM_NULLPTR;
}
handler->SetOption("SourceDirectory", source_dir.c_str());
handler->SetQuiet(this->Quiet);

View File

@ -27,7 +27,7 @@ public:
/**
* This is a virtual constructor for the command.
*/
virtual cmCommand* Clone()
cmCommand* Clone() CM_OVERRIDE
{
cmCTestUpdateCommand* ni = new cmCTestUpdateCommand;
ni->CTest = this->CTest;
@ -38,12 +38,12 @@ public:
/**
* The name of the command as specified in CMakeList.txt.
*/
virtual std::string GetName() const { return "ctest_update"; }
std::string GetName() const CM_OVERRIDE { return "ctest_update"; }
cmTypeMacro(cmCTestUpdateCommand, cmCTestHandlerCommand);
protected:
cmCTestGenericHandler* InitializeHandler();
cmCTestGenericHandler* InitializeHandler() CM_OVERRIDE;
};
#endif

View File

@ -334,7 +334,7 @@ bool cmCTestUpdateHandler::SelectVCS()
// If no update command was specified, lookup one for this VCS tool.
if (this->UpdateCommand.empty()) {
const char* key = 0;
const char* key = CM_NULLPTR;
switch (this->UpdateType) {
case e_CVS:
key = "CVSCommand";

View File

@ -29,7 +29,7 @@ public:
/*
* The main entry point for this class
*/
int ProcessHandler();
int ProcessHandler() CM_OVERRIDE;
cmCTestUpdateHandler();
@ -48,7 +48,7 @@ public:
/**
* Initialize handler
*/
virtual void Initialize();
void Initialize() CM_OVERRIDE;
private:
// Some structures needed for update

View File

@ -21,7 +21,7 @@ cmCTestGenericHandler* cmCTestUploadCommand::InitializeHandler()
this->CTest->GetInitializedHandler("upload");
if (!handler) {
this->SetError("internal CTest error. Cannot instantiate upload handler");
return 0;
return CM_NULLPTR;
}
static_cast<cmCTestUploadHandler*>(handler)->SetFiles(this->Files);

View File

@ -30,7 +30,7 @@ public:
/**
* This is a virtual constructor for the command.
*/
virtual cmCommand* Clone()
cmCommand* Clone() CM_OVERRIDE
{
cmCTestUploadCommand* ni = new cmCTestUploadCommand;
ni->CTest = this->CTest;
@ -41,15 +41,15 @@ public:
/**
* The name of the command as specified in CMakeList.txt.
*/
virtual std::string GetName() const { return "ctest_upload"; }
std::string GetName() const CM_OVERRIDE { return "ctest_upload"; }
cmTypeMacro(cmCTestUploadCommand, cmCTestHandlerCommand);
protected:
cmCTestGenericHandler* InitializeHandler();
cmCTestGenericHandler* InitializeHandler() CM_OVERRIDE;
virtual bool CheckArgumentKeyword(std::string const& arg);
virtual bool CheckArgumentValue(std::string const& arg);
bool CheckArgumentKeyword(std::string const& arg) CM_OVERRIDE;
bool CheckArgumentValue(std::string const& arg) CM_OVERRIDE;
enum
{

View File

@ -26,14 +26,14 @@ public:
cmTypeMacro(cmCTestUploadHandler, cmCTestGenericHandler);
cmCTestUploadHandler();
~cmCTestUploadHandler() {}
~cmCTestUploadHandler() CM_OVERRIDE {}
/*
* The main entry point for this class
*/
int ProcessHandler();
int ProcessHandler() CM_OVERRIDE;
void Initialize();
void Initialize() CM_OVERRIDE;
/** Specify a set of files to submit. */
void SetFiles(cmCTest::SetOfStrings const& files);

View File

@ -65,7 +65,7 @@ bool cmCTestVC::InitialCheckout(const char* command)
ai != args.end(); ++ai) {
vc_co.push_back(ai->c_str());
}
vc_co.push_back(0);
vc_co.push_back(CM_NULLPTR);
// Run the initial checkout command and log its output.
this->Log << "--- Begin Initial Checkout ---\n";

View File

@ -104,8 +104,8 @@ protected:
Revision const* PriorRev;
File()
: Status(PathUpdated)
, Rev(0)
, PriorRev(0)
, Rev(CM_NULLPTR)
, PriorRev(CM_NULLPTR)
{
}
File(PathStatus status, Revision const* rev, Revision const* priorRev)
@ -121,11 +121,11 @@ protected:
/** Run a command line and send output to given parsers. */
bool RunChild(char const* const* cmd, OutputParser* out, OutputParser* err,
const char* workDir = 0);
const char* workDir = CM_NULLPTR);
/** Run VC update command line and send output to given parsers. */
bool RunUpdateCommand(char const* const* cmd, OutputParser* out,
OutputParser* err = 0);
OutputParser* err = CM_NULLPTR);
/** Write xml element for one file. */
void WriteXMLEntry(cmXMLWriter& xml, std::string const& path,

View File

@ -28,7 +28,7 @@ public:
protected:
// implement virtual from parent
bool LoadCoverageData(const char* dir);
bool LoadCoverageData(const char* dir) CM_OVERRIDE;
// remove files with no coverage
void RemoveUnCoveredFiles();
// Read a single mcov file

View File

@ -20,7 +20,7 @@ public:
this->CurFileName = "";
}
virtual ~XMLParser() {}
~XMLParser() CM_OVERRIDE {}
protected:
void EndElement(const std::string& name) CM_OVERRIDE

View File

@ -28,7 +28,7 @@ public:
protected:
// implement virtual from parent
bool LoadCoverageData(const char* dir);
bool LoadCoverageData(const char* dir) CM_OVERRIDE;
// Read a single mcov file
bool ReadMCovFile(const char* f);
// find out what line in a mumps file (filepath) the given entry point

View File

@ -20,7 +20,7 @@ public:
this->PackageName = "";
}
virtual ~XMLParser() {}
~XMLParser() CM_OVERRIDE {}
protected:
void EndElement(const std::string&) CM_OVERRIDE {}

View File

@ -130,8 +130,8 @@ bool cmParseMumpsCoverage::FindMumpsFile(std::string const& routine,
return true;
} else {
// try some alternate names
const char* tryname[] = { "GUX", "GTM", "ONT", 0 };
for (int k = 0; tryname[k] != 0; k++) {
const char* tryname[] = { "GUX", "GTM", "ONT", CM_NULLPTR };
for (int k = 0; tryname[k] != CM_NULLPTR; k++) {
std::string routine2 = routine + tryname[k];
i = this->RoutineToDirectory.find(routine2);
if (i != this->RoutineToDirectory.end()) {

View File

@ -16,7 +16,7 @@
cmProcess::cmProcess()
{
this->Process = 0;
this->Process = CM_NULLPTR;
this->Timeout = 0;
this->TotalTime = 0;
this->ExitValue = 0;
@ -52,7 +52,7 @@ bool cmProcess::StartProcess()
i != this->Arguments.end(); ++i) {
this->ProcessArgs.push_back(i->c_str());
}
this->ProcessArgs.push_back(0); // null terminate the list
this->ProcessArgs.push_back(CM_NULLPTR); // null terminate the list
this->Process = cmsysProcess_New();
cmsysProcess_SetCommand(this->Process, &*this->ProcessArgs.begin());
if (!this->WorkingDirectory.empty()) {

View File

@ -32,6 +32,7 @@ function(cm_check_cxx_feature name)
endfunction()
if(CMAKE_CXX_STANDARD)
cm_check_cxx_feature(nullptr)
cm_check_cxx_feature(override)
cm_check_cxx_feature(unordered_map)
cm_check_cxx_feature(unordered_set)

View File

@ -0,0 +1,14 @@
int test(int)
{
return -1;
}
int test(int*)
{
return 0;
}
int main()
{
return test(nullptr);
}

View File

@ -1,10 +1,12 @@
struct Foo
{
virtual ~Foo() {}
virtual int test() const = 0;
};
struct Bar : Foo
{
~Bar() override {}
int test() const override { return 0; }
};

Some files were not shown because too many files have changed in this diff Show More