Commit 0b33aee4 authored by Brad King's avatar Brad King

Use C++11 override instead of CM_OVERRIDE

We now require C++11 support including `override`.  Drop use of
the old compatibility macro.  Convert references as follows:

    git grep -l CM_OVERRIDE -- '*.h' '*.hxx' '*.cxx' |
      xargs sed -i 's/CM_OVERRIDE/override/g'
parent c0c5f924
......@@ -47,7 +47,7 @@ public:
/**
* Destruct IFW generator
*/
~cmCPackIFWGenerator() CM_OVERRIDE;
~cmCPackIFWGenerator() override;
protected:
// cmCPackGenerator reimplementation
......@@ -56,18 +56,18 @@ protected:
* @brief Initialize generator
* @return 0 on failure
*/
int InitializeInternal() CM_OVERRIDE;
int PackageFiles() CM_OVERRIDE;
const char* GetPackagingInstallPrefix() CM_OVERRIDE;
int InitializeInternal() override;
int PackageFiles() override;
const char* GetPackagingInstallPrefix() override;
/**
* @brief Target binary extension
* @return Executable suffix or disk image format
*/
const char* GetOutputExtension() CM_OVERRIDE;
const char* GetOutputExtension() override;
std::string GetComponentInstallDirNameSuffix(
const std::string& componentName) CM_OVERRIDE;
const std::string& componentName) override;
/**
* @brief Get Component
......@@ -79,7 +79,7 @@ protected:
* @return Pointer to component
*/
cmCPackComponent* GetComponent(const std::string& projectName,
const std::string& componentName) CM_OVERRIDE;
const std::string& componentName) override;
/**
* @brief Get group of component
......@@ -91,12 +91,12 @@ protected:
* @return Pointer to component group
*/
cmCPackComponentGroup* GetComponentGroup(
const std::string& projectName, const std::string& groupName) CM_OVERRIDE;
const std::string& projectName, const std::string& groupName) override;
enum cmCPackGenerator::CPackSetDestdirSupport SupportsSetDestdir() const
CM_OVERRIDE;
bool SupportsAbsoluteDestination() const CM_OVERRIDE;
bool SupportsComponentInstallation() const CM_OVERRIDE;
enum cmCPackGenerator::CPackSetDestdirSupport SupportsSetDestdir()
const override;
bool SupportsAbsoluteDestination() const override;
bool SupportsComponentInstallation() const override;
protected:
// Methods
......
......@@ -262,7 +262,7 @@ public:
std::string path, basePath;
protected:
void StartElement(const std::string& name, const char** /*atts*/) CM_OVERRIDE
void StartElement(const std::string& name, const char** /*atts*/) override
{
this->file = name == "file";
if (file) {
......@@ -270,7 +270,7 @@ protected:
}
}
void CharacterDataHandler(const char* data, int length) CM_OVERRIDE
void CharacterDataHandler(const char* data, int length) override
{
if (this->file) {
std::string content(data, data + length);
......@@ -284,7 +284,7 @@ protected:
}
}
void EndElement(const std::string& /*name*/) CM_OVERRIDE {}
void EndElement(const std::string& /*name*/) override {}
};
void cmCPackIFWInstaller::GenerateInstallerFile()
......
......@@ -128,7 +128,7 @@ public:
bool patched;
protected:
void StartElement(const std::string& name, const char** atts) CM_OVERRIDE
void StartElement(const std::string& name, const char** atts) override
{
this->xout.StartElement(name);
this->StartFragment(atts);
......@@ -143,7 +143,7 @@ protected:
}
}
void EndElement(const std::string& name) CM_OVERRIDE
void EndElement(const std::string& name) override
{
if (name == "Updates" && !this->patched) {
this->repository->WriteRepositoryUpdates(this->xout);
......@@ -159,7 +159,7 @@ protected:
}
}
void CharacterDataHandler(const char* data, int length) CM_OVERRIDE
void CharacterDataHandler(const char* data, int length) override
{
std::string content(data, data + length);
if (content == "" || content == " " || content == " " ||
......
......@@ -20,10 +20,10 @@ public:
* Construct generator
*/
cmCPack7zGenerator();
~cmCPack7zGenerator() CM_OVERRIDE;
~cmCPack7zGenerator() override;
protected:
const char* GetOutputExtension() CM_OVERRIDE { return ".7z"; }
const char* GetOutputExtension() override { return ".7z"; }
};
#endif
......@@ -28,11 +28,11 @@ public:
* Construct generator
*/
cmCPackArchiveGenerator(cmArchiveWrite::Compress, std::string const& format);
~cmCPackArchiveGenerator() CM_OVERRIDE;
~cmCPackArchiveGenerator() override;
// Used to add a header to the archive
virtual int GenerateHeader(std::ostream* os);
// component support
bool SupportsComponentInstallation() const CM_OVERRIDE;
bool SupportsComponentInstallation() const override;
private:
// get archive component filename
......@@ -40,7 +40,7 @@ private:
bool isGroupName);
protected:
int InitializeInternal() CM_OVERRIDE;
int InitializeInternal() override;
/**
* Add the files belonging to the specified component
* to the provided (already opened) archive.
......@@ -56,7 +56,7 @@ protected:
* method will call either PackageComponents or
* PackageComponentsAllInOne.
*/
int PackageFiles() CM_OVERRIDE;
int PackageFiles() override;
/**
* The method used to package files when component
* install is used. This will create one
......@@ -68,7 +68,7 @@ protected:
* components will be put in a single installer.
*/
int PackageComponentsAllInOne();
const char* GetOutputExtension() CM_OVERRIDE = 0;
const char* GetOutputExtension() override = 0;
cmArchiveWrite::Compress Compress;
std::string ArchiveFormat;
};
......
......@@ -21,15 +21,15 @@ public:
cmCPackTypeMacro(cmCPackBundleGenerator, cmCPackDragNDropGenerator);
cmCPackBundleGenerator();
~cmCPackBundleGenerator() CM_OVERRIDE;
~cmCPackBundleGenerator() override;
protected:
int InitializeInternal() CM_OVERRIDE;
const char* GetPackagingInstallPrefix() CM_OVERRIDE;
int InitializeInternal() override;
const char* GetPackagingInstallPrefix() override;
int ConstructBundle();
int SignBundle(const std::string& src_dir);
int PackageFiles() CM_OVERRIDE;
bool SupportsComponentInstallation() const CM_OVERRIDE;
int PackageFiles() override;
bool SupportsComponentInstallation() const override;
std::string InstallPrefix;
};
......
......@@ -17,7 +17,7 @@ public:
* Construct generator
*/
cmCPackCygwinBinaryGenerator();
~cmCPackCygwinBinaryGenerator() CM_OVERRIDE;
~cmCPackCygwinBinaryGenerator() override;
protected:
virtual int InitializeInternal();
......
......@@ -17,7 +17,7 @@ public:
* Construct generator
*/
cmCPackCygwinSourceGenerator();
~cmCPackCygwinSourceGenerator() CM_OVERRIDE;
~cmCPackCygwinSourceGenerator() override;
protected:
const char* GetPackagingInstallPrefix();
......
......@@ -23,7 +23,7 @@ public:
* Construct generator
*/
cmCPackDebGenerator();
~cmCPackDebGenerator() CM_OVERRIDE;
~cmCPackDebGenerator() override;
static bool CanGenerate()
{
......@@ -40,7 +40,7 @@ public:
}
protected:
int InitializeInternal() CM_OVERRIDE;
int InitializeInternal() override;
/**
* This method factors out the work done in component packaging case.
*/
......@@ -57,11 +57,11 @@ protected:
* components will be put in a single installer.
*/
int PackageComponentsAllInOne(const std::string& compInstDirName);
int PackageFiles() CM_OVERRIDE;
const char* GetOutputExtension() CM_OVERRIDE { return ".deb"; }
bool SupportsComponentInstallation() const CM_OVERRIDE;
int PackageFiles() override;
const char* GetOutputExtension() override { return ".deb"; }
bool SupportsComponentInstallation() const override;
std::string GetComponentInstallDirNameSuffix(
const std::string& componentName) CM_OVERRIDE;
const std::string& componentName) override;
private:
int createDeb();
......
......@@ -23,20 +23,20 @@ public:
cmCPackTypeMacro(cmCPackDragNDropGenerator, cmCPackGenerator);
cmCPackDragNDropGenerator();
~cmCPackDragNDropGenerator() CM_OVERRIDE;
~cmCPackDragNDropGenerator() override;
protected:
int InitializeInternal() CM_OVERRIDE;
const char* GetOutputExtension() CM_OVERRIDE;
int PackageFiles() CM_OVERRIDE;
bool SupportsComponentInstallation() const CM_OVERRIDE;
int InitializeInternal() override;
const char* GetOutputExtension() override;
int PackageFiles() override;
bool SupportsComponentInstallation() const override;
bool CopyFile(std::ostringstream& source, std::ostringstream& target);
bool CreateEmptyFile(std::ostringstream& target, size_t size);
bool RunCommand(std::ostringstream& command, std::string* output = 0);
std::string GetComponentInstallDirNameSuffix(
const std::string& componentName) CM_OVERRIDE;
const std::string& componentName) override;
int CreateDMG(const std::string& src_dir, const std::string& output_file);
......
......@@ -122,7 +122,7 @@ public:
{
}
void write_value(cmGeneratedFileStream& s) const CM_OVERRIDE
void write_value(cmGeneratedFileStream& s) const override
{
s << EscapeQuotes(value);
}
......@@ -154,7 +154,7 @@ public:
return *this;
}
void write_value(cmGeneratedFileStream& s) const CM_OVERRIDE
void write_value(cmGeneratedFileStream& s) const override
{
bool with_comma = false;
......@@ -179,7 +179,7 @@ public:
{
}
void write_value(cmGeneratedFileStream& s) const CM_OVERRIDE
void write_value(cmGeneratedFileStream& s) const override
{
s << "{\n";
for (VList::const_iterator it = value.begin(); it != value.end(); ++it) {
......
......@@ -22,13 +22,13 @@ public:
* Construct generator
*/
cmCPackFreeBSDGenerator();
~cmCPackFreeBSDGenerator() CM_OVERRIDE;
~cmCPackFreeBSDGenerator() override;
int InitializeInternal() CM_OVERRIDE;
int PackageFiles() CM_OVERRIDE;
int InitializeInternal() override;
int PackageFiles() override;
protected:
const char* GetOutputExtension() CM_OVERRIDE { return ".txz"; }
const char* GetOutputExtension() override { return ".txz"; }
std::string var_lookup(const char* var_name);
void write_manifest_fields(cmGeneratedFileStream&);
......
......@@ -299,7 +299,7 @@ private:
#define cmCPackTypeMacro(klass, superclass) \
typedef superclass Superclass; \
const char* GetNameOfClass() CM_OVERRIDE { return #klass; } \
const char* GetNameOfClass() override { return #klass; } \
static cmCPackGenerator* CreateGenerator() { return new klass; } \
class cmCPackTypeMacro_UseTrailingSemicolon
......
......@@ -34,22 +34,22 @@ public:
* Construct generator
*/
cmCPackNSISGenerator(bool nsis64 = false);
~cmCPackNSISGenerator() CM_OVERRIDE;
~cmCPackNSISGenerator() override;
protected:
int InitializeInternal() CM_OVERRIDE;
int InitializeInternal() override;
void CreateMenuLinks(std::ostream& str, std::ostream& deleteStr);
int PackageFiles() CM_OVERRIDE;
const char* GetOutputExtension() CM_OVERRIDE { return ".exe"; }
const char* GetOutputPostfix() CM_OVERRIDE { return "win32"; }
int PackageFiles() override;
const char* GetOutputExtension() override { return ".exe"; }
const char* GetOutputPostfix() override { return "win32"; }
bool GetListOfSubdirectories(const char* dir,
std::vector<std::string>& dirs);
enum cmCPackGenerator::CPackSetDestdirSupport SupportsSetDestdir() const
CM_OVERRIDE;
bool SupportsAbsoluteDestination() const CM_OVERRIDE;
bool SupportsComponentInstallation() const CM_OVERRIDE;
enum cmCPackGenerator::CPackSetDestdirSupport SupportsSetDestdir()
const override;
bool SupportsAbsoluteDestination() const override;
bool SupportsComponentInstallation() const override;
/// Produce a string that contains the NSIS code to describe a
/// particular component. Any added macros will be emitted via
......
......@@ -23,13 +23,13 @@ public:
* Construct generator
*/
cmCPackOSXX11Generator();
~cmCPackOSXX11Generator() CM_OVERRIDE;
~cmCPackOSXX11Generator() override;
protected:
virtual int InitializeInternal() CM_OVERRIDE;
int PackageFiles() CM_OVERRIDE;
const char* GetPackagingInstallPrefix() CM_OVERRIDE;
const char* GetOutputExtension() CM_OVERRIDE { return ".dmg"; }
virtual int InitializeInternal() override;
int PackageFiles() override;
const char* GetPackagingInstallPrefix() override;
const char* GetOutputExtension() override { return ".dmg"; }
// bool CopyCreateResourceFile(const std::string& name,
// const std::string& dir);
......
......@@ -27,13 +27,13 @@ public:
* Construct generator
*/
cmCPackPKGGenerator();
~cmCPackPKGGenerator() CM_OVERRIDE;
~cmCPackPKGGenerator() override;
bool SupportsComponentInstallation() const CM_OVERRIDE;
bool SupportsComponentInstallation() const override;
protected:
int InitializeInternal() CM_OVERRIDE;
const char* GetOutputPostfix() CM_OVERRIDE { return "darwin"; }
int InitializeInternal() override;
const char* GetOutputPostfix() override { return "darwin"; }
// Copies or creates the resource file with the given name to the
// package or package staging directory dirName. The variable
......
......@@ -25,13 +25,13 @@ public:
* Construct generator
*/
cmCPackPackageMakerGenerator();
~cmCPackPackageMakerGenerator() CM_OVERRIDE;
bool SupportsComponentInstallation() const CM_OVERRIDE;
~cmCPackPackageMakerGenerator() override;
bool SupportsComponentInstallation() const override;
protected:
int InitializeInternal() CM_OVERRIDE;
int PackageFiles() CM_OVERRIDE;
const char* GetOutputExtension() CM_OVERRIDE { return ".dmg"; }
int InitializeInternal() override;
int PackageFiles() override;
const char* GetOutputExtension() override { return ".dmg"; }
// Run PackageMaker with the given command line, which will (if
// successful) produce the given package file. Returns true if
......
......@@ -25,12 +25,12 @@ public:
* Construct generator
*/
cmCPackProductBuildGenerator();
~cmCPackProductBuildGenerator() CM_OVERRIDE;
~cmCPackProductBuildGenerator() override;
protected:
int InitializeInternal() CM_OVERRIDE;
int PackageFiles() CM_OVERRIDE;
const char* GetOutputExtension() CM_OVERRIDE { return ".pkg"; }
int InitializeInternal() override;
int PackageFiles() override;
const char* GetOutputExtension() override { return ".pkg"; }
// Run ProductBuild with the given command line, which will (if
// successful) produce the given package file. Returns true if
......
......@@ -26,7 +26,7 @@ public:
* Construct generator
*/
cmCPackRPMGenerator();
~cmCPackRPMGenerator() CM_OVERRIDE;
~cmCPackRPMGenerator() override;
static bool CanGenerate()
{
......@@ -43,8 +43,8 @@ public:
}
protected:
int InitializeInternal() CM_OVERRIDE;
int PackageFiles() CM_OVERRIDE;
int InitializeInternal() override;
int PackageFiles() override;
/**
* This method factors out the work done in component packaging case.
*/
......@@ -61,10 +61,10 @@ protected:
* components will be put in a single installer.
*/
int PackageComponentsAllInOne(const std::string& compInstDirName);
const char* GetOutputExtension() CM_OVERRIDE { return ".rpm"; }
bool SupportsComponentInstallation() const CM_OVERRIDE;
const char* GetOutputExtension() override { return ".rpm"; }
bool SupportsComponentInstallation() const override;
std::string GetComponentInstallDirNameSuffix(
const std::string& componentName) CM_OVERRIDE;
const std::string& componentName) override;
void AddGeneratedPackageNames();
};
......
......@@ -23,13 +23,13 @@ public:
* Construct generator
*/
cmCPackSTGZGenerator();
~cmCPackSTGZGenerator() CM_OVERRIDE;
~cmCPackSTGZGenerator() override;
protected:
int PackageFiles() CM_OVERRIDE;
int InitializeInternal() CM_OVERRIDE;
int GenerateHeader(std::ostream* os) CM_OVERRIDE;
const char* GetOutputExtension() CM_OVERRIDE { return ".sh"; }
int PackageFiles() override;
int InitializeInternal() override;
int GenerateHeader(std::ostream* os) override;
const char* GetOutputExtension() override { return ".sh"; }
};
#endif
......@@ -20,10 +20,10 @@ public:
* Construct generator
*/
cmCPackTGZGenerator();
~cmCPackTGZGenerator() CM_OVERRIDE;
~cmCPackTGZGenerator() override;
protected:
const char* GetOutputExtension() CM_OVERRIDE { return ".tar.gz"; }
const char* GetOutputExtension() override { return ".tar.gz"; }
};
#endif
......@@ -20,10 +20,10 @@ public:
* Construct generator
*/
cmCPackTXZGenerator();
~cmCPackTXZGenerator() CM_OVERRIDE;
~cmCPackTXZGenerator() override;
protected:
const char* GetOutputExtension() CM_OVERRIDE { return ".tar.xz"; }
const char* GetOutputExtension() override { return ".tar.xz"; }
};
#endif
......@@ -19,10 +19,10 @@ public:
* Construct generator
*/
cmCPackTarBZip2Generator();
~cmCPackTarBZip2Generator() CM_OVERRIDE;
~cmCPackTarBZip2Generator() override;
protected:
const char* GetOutputExtension() CM_OVERRIDE { return ".tar.bz2"; }
const char* GetOutputExtension() override { return ".tar.bz2"; }
};
#endif
......@@ -19,10 +19,10 @@ public:
* Construct generator
*/
cmCPackTarCompressGenerator();
~cmCPackTarCompressGenerator() CM_OVERRIDE;
~cmCPackTarCompressGenerator() override;
protected:
const char* GetOutputExtension() CM_OVERRIDE { return ".tar.Z"; }
const char* GetOutputExtension() override { return ".tar.Z"; }
};
#endif
......@@ -20,10 +20,10 @@ public:
* Construct generator
*/
cmCPackZIPGenerator();
~cmCPackZIPGenerator() CM_OVERRIDE;
~cmCPackZIPGenerator() override;
protected:
const char* GetOutputExtension() CM_OVERRIDE { return ".zip"; }
const char* GetOutputExtension() override { return ".zip"; }
};
#endif
......@@ -98,7 +98,7 @@ private:
bool CheckOutFound;
cmsys::RegularExpression RegexCheckOut;
cmsys::RegularExpression RegexParent;
bool ProcessLine() CM_OVERRIDE
bool ProcessLine() override
{
if (this->RegexCheckOut.find(this->Line)) {
this->BZR->URL = this->RegexCheckOut.match(1);
......@@ -123,7 +123,7 @@ public:
private:
std::string& Rev;
cmsys::RegularExpression RegexRevno;
bool ProcessLine() CM_OVERRIDE
bool ProcessLine() override
{
if (this->RegexRevno.find(this->Line)) {
this->Rev = this->RegexRevno.match(1);
......@@ -182,9 +182,9 @@ public:
{
this->InitializeParser();
}
~LogParser() CM_OVERRIDE { this->CleanupParser(); }
~LogParser() override { this->CleanupParser(); }
int InitializeParser() CM_OVERRIDE
int InitializeParser() override
{
int res = cmXMLParser::InitializeParser();
if (res) {
......@@ -207,14 +207,14 @@ private:
cmsys::RegularExpression EmailRegex;
bool ProcessChunk(const char* data, int length) CM_OVERRIDE
bool ProcessChunk(const char* data, int length) override
{
this->OutputLogger::ProcessChunk(data, length);
this->ParseChunk(data, length);
return true;
}
void StartElement(const std::string& name, const char** /*atts*/) CM_OVERRIDE
void StartElement(const std::string& name, const char** /*atts*/) override
{
this->CData.clear();
if (name == "log") {
......@@ -239,12 +239,12 @@ private:
}
}
void CharacterDataHandler(const char* data, int length) CM_OVERRIDE
void CharacterDataHandler(const char* data, int length) override
{
this->CData.insert(this->CData.end(), data, data + length);
}
void EndElement(const std::string& name) CM_OVERRIDE
void EndElement(const std::string& name) override
{
if (name == "log") {