Make cmGlobalGenerator::GetDocumentation() a static function

Making the function static allows us to call it directly,
without creating and removing an instance of the generator.
This commit is contained in:
Patrick Gansterer 2012-11-19 16:42:24 +01:00 committed by Brad King
parent 04ff866ca8
commit 5170a8800f
49 changed files with 70 additions and 82 deletions

View File

@ -55,9 +55,9 @@ cmLocalGenerator *cmGlobalBorlandMakefileGenerator::CreateLocalGenerator()
//----------------------------------------------------------------------------
void cmGlobalBorlandMakefileGenerator
::GetDocumentation(cmDocumentationEntry& entry) const
::GetDocumentation(cmDocumentationEntry& entry)
{
entry.Name = this->GetName();
entry.Name = cmGlobalBorlandMakefileGenerator::GetActualName();
entry.Brief = "Generates Borland makefiles.";
entry.Full = "";
}

View File

@ -33,7 +33,7 @@ public:
static const char* GetActualName() {return "Borland Makefiles";}
/** Get the documentation entry for this generator. */
virtual void GetDocumentation(cmDocumentationEntry& entry) const;
static void GetDocumentation(cmDocumentationEntry& entry);
///! Create a local generator appropriate to this Global Generator
virtual cmLocalGenerator *CreateLocalGenerator();

View File

@ -1555,14 +1555,6 @@ void cmGlobalGenerator::SetConfiguredFilesPath(cmGlobalGenerator* gen)
}
}
//----------------------------------------------------------------------------
void cmGlobalGenerator::GetDocumentation(cmDocumentationEntry& entry) const
{
entry.Name = this->GetName();
entry.Brief = "";
entry.Full = "";
}
bool cmGlobalGenerator::IsExcluded(cmLocalGenerator* root,
cmLocalGenerator* gen)
{

View File

@ -49,9 +49,6 @@ public:
///! Get the name for this generator
virtual const char *GetName() const { return "Generic"; };
/** Get the documentation entry for this generator. */
virtual void GetDocumentation(cmDocumentationEntry& entry) const;
/**
* Create LocalGenerators and process the CMakeLists files. This does not
* actually produce any makefiles, DSPs, etc.

View File

@ -49,7 +49,7 @@ public:
/** Get the documentation entry for this factory */
virtual void GetDocumentation(cmDocumentationEntry& entry) const {
T().GetDocumentation(entry); }
T::GetDocumentation(entry); }
/** Get the names of the current registered generators */
virtual void GetGenerators(std::vector<std::string>& names) const {

View File

@ -61,9 +61,9 @@ cmLocalGenerator *cmGlobalJOMMakefileGenerator::CreateLocalGenerator()
//----------------------------------------------------------------------------
void cmGlobalJOMMakefileGenerator
::GetDocumentation(cmDocumentationEntry& entry) const
::GetDocumentation(cmDocumentationEntry& entry)
{
entry.Name = this->GetName();
entry.Name = cmGlobalJOMMakefileGenerator::GetActualName();
entry.Brief = "Generates JOM makefiles.";
entry.Full = "";
}

View File

@ -34,7 +34,7 @@ public:
static const char* GetActualName() {return "NMake Makefiles JOM";}
/** Get the documentation entry for this generator. */
virtual void GetDocumentation(cmDocumentationEntry& entry) const;
static void GetDocumentation(cmDocumentationEntry& entry);
///! Create a local generator appropriate to this Global Generator
virtual cmLocalGenerator *CreateLocalGenerator();

View File

@ -106,9 +106,9 @@ cmLocalGenerator *cmGlobalMSYSMakefileGenerator::CreateLocalGenerator()
//----------------------------------------------------------------------------
void cmGlobalMSYSMakefileGenerator
::GetDocumentation(cmDocumentationEntry& entry) const
::GetDocumentation(cmDocumentationEntry& entry)
{
entry.Name = this->GetName();
entry.Name = cmGlobalMSYSMakefileGenerator::GetActualName();
entry.Brief = "Generates MSYS makefiles.";
entry.Full = "The makefiles use /bin/sh as the shell. "
"They require msys to be installed on the machine.";

View File

@ -33,7 +33,7 @@ public:
static const char* GetActualName() {return "MSYS Makefiles";}
/** Get the documentation entry for this generator. */
virtual void GetDocumentation(cmDocumentationEntry& entry) const;
static void GetDocumentation(cmDocumentationEntry& entry);
///! Create a local generator appropriate to this Global Generator
virtual cmLocalGenerator *CreateLocalGenerator();

View File

@ -71,9 +71,9 @@ cmLocalGenerator *cmGlobalMinGWMakefileGenerator::CreateLocalGenerator()
//----------------------------------------------------------------------------
void cmGlobalMinGWMakefileGenerator
::GetDocumentation(cmDocumentationEntry& entry) const
::GetDocumentation(cmDocumentationEntry& entry)
{
entry.Name = this->GetName();
entry.Name = cmGlobalMinGWMakefileGenerator::GetActualName();
entry.Brief = "Generates a make file for use with mingw32-make.";
entry.Full = "The makefiles generated use cmd.exe as the shell. "
"They do not require msys or a unix shell.";

View File

@ -32,7 +32,7 @@ public:
static const char* GetActualName() {return "MinGW Makefiles";}
/** Get the documentation entry for this generator. */
virtual void GetDocumentation(cmDocumentationEntry& entry) const;
static void GetDocumentation(cmDocumentationEntry& entry);
///! Create a local generator appropriate to this Global Generator
virtual cmLocalGenerator *CreateLocalGenerator();

View File

@ -61,9 +61,9 @@ cmLocalGenerator *cmGlobalNMakeMakefileGenerator::CreateLocalGenerator()
//----------------------------------------------------------------------------
void cmGlobalNMakeMakefileGenerator
::GetDocumentation(cmDocumentationEntry& entry) const
::GetDocumentation(cmDocumentationEntry& entry)
{
entry.Name = this->GetName();
entry.Name = cmGlobalNMakeMakefileGenerator::GetActualName();
entry.Brief = "Generates NMake makefiles.";
entry.Full = "";
}

View File

@ -32,7 +32,7 @@ public:
static const char* GetActualName() {return "NMake Makefiles";}
/** Get the documentation entry for this generator. */
virtual void GetDocumentation(cmDocumentationEntry& entry) const;
static void GetDocumentation(cmDocumentationEntry& entry);
///! Create a local generator appropriate to this Global Generator
virtual cmLocalGenerator *CreateLocalGenerator();

View File

@ -452,9 +452,9 @@ cmLocalGenerator* cmGlobalNinjaGenerator::CreateLocalGenerator()
}
void cmGlobalNinjaGenerator
::GetDocumentation(cmDocumentationEntry& entry) const
::GetDocumentation(cmDocumentationEntry& entry)
{
entry.Name = this->GetName();
entry.Name = cmGlobalNinjaGenerator::GetActualName();
entry.Brief = "Generates build.ninja files (experimental).";
entry.Full =
"A build.ninja file is generated into the build tree. Recent "

View File

@ -178,7 +178,7 @@ public:
static const char* GetActualName() { return "Ninja"; }
/// Overloaded methods. @see cmGlobalGenerator::GetDocumentation()
virtual void GetDocumentation(cmDocumentationEntry& entry) const;
static void GetDocumentation(cmDocumentationEntry& entry);
/// Overloaded methods. @see cmGlobalGenerator::Generate()
virtual void Generate();

View File

@ -61,9 +61,9 @@ cmLocalGenerator *cmGlobalUnixMakefileGenerator3::CreateLocalGenerator()
//----------------------------------------------------------------------------
void cmGlobalUnixMakefileGenerator3
::GetDocumentation(cmDocumentationEntry& entry) const
::GetDocumentation(cmDocumentationEntry& entry)
{
entry.Name = this->GetName();
entry.Name = cmGlobalUnixMakefileGenerator3::GetActualName();
entry.Brief = "Generates standard UNIX makefiles.";
entry.Full =
"A hierarchy of UNIX makefiles is generated into the build tree. Any "

View File

@ -65,7 +65,7 @@ public:
static const char* GetActualName() {return "Unix Makefiles";}
/** Get the documentation entry for this generator. */
virtual void GetDocumentation(cmDocumentationEntry& entry) const;
static void GetDocumentation(cmDocumentationEntry& entry);
///! Create a local generator appropriate to this Global Generator3
virtual cmLocalGenerator *CreateLocalGenerator();

View File

@ -88,9 +88,9 @@ void cmGlobalVisualStudio10Generator::Generate()
//----------------------------------------------------------------------------
void cmGlobalVisualStudio10Generator
::GetDocumentation(cmDocumentationEntry& entry) const
::GetDocumentation(cmDocumentationEntry& entry)
{
entry.Name = this->GetName();
entry.Name = cmGlobalVisualStudio10Generator::GetActualName();
entry.Brief = "Generates Visual Studio 10 project files.";
entry.Full = "";
}

View File

@ -42,7 +42,7 @@ public:
virtual void AddPlatformDefinitions(cmMakefile* mf);
/** Get the documentation entry for this generator. */
virtual void GetDocumentation(cmDocumentationEntry& entry) const;
static void GetDocumentation(cmDocumentationEntry& entry);
///! create the correct local generator
virtual cmLocalGenerator *CreateLocalGenerator();

View File

@ -21,9 +21,9 @@ cmGlobalVisualStudio10IA64Generator::cmGlobalVisualStudio10IA64Generator()
//----------------------------------------------------------------------------
void cmGlobalVisualStudio10IA64Generator
::GetDocumentation(cmDocumentationEntry& entry) const
::GetDocumentation(cmDocumentationEntry& entry)
{
entry.Name = this->GetName();
entry.Name = cmGlobalVisualStudio10IA64Generator::GetActualName();
entry.Brief = "Generates Visual Studio 10 Itanium project files.";
entry.Full = "";
}

View File

@ -31,7 +31,7 @@ public:
virtual const char* GetPlatformName() const {return "Itanium";}
/** Get the documentation entry for this generator. */
virtual void GetDocumentation(cmDocumentationEntry& entry) const;
static void GetDocumentation(cmDocumentationEntry& entry);
virtual void AddPlatformDefinitions(cmMakefile* mf);

View File

@ -21,9 +21,9 @@ cmGlobalVisualStudio10Win64Generator::cmGlobalVisualStudio10Win64Generator()
//----------------------------------------------------------------------------
void cmGlobalVisualStudio10Win64Generator
::GetDocumentation(cmDocumentationEntry& entry) const
::GetDocumentation(cmDocumentationEntry& entry)
{
entry.Name = this->GetName();
entry.Name = cmGlobalVisualStudio10Win64Generator::GetActualName();
entry.Brief = "Generates Visual Studio 10 Win64 project files.";
entry.Full = "";
}

View File

@ -31,7 +31,7 @@ public:
virtual const char* GetPlatformName() const {return "x64";}
/** Get the documentation entry for this generator. */
virtual void GetDocumentation(cmDocumentationEntry& entry) const;
static void GetDocumentation(cmDocumentationEntry& entry);
virtual void AddPlatformDefinitions(cmMakefile* mf);

View File

@ -21,9 +21,9 @@ cmGlobalVisualStudio11ARMGenerator::cmGlobalVisualStudio11ARMGenerator()
//----------------------------------------------------------------------------
void cmGlobalVisualStudio11ARMGenerator
::GetDocumentation(cmDocumentationEntry& entry) const
::GetDocumentation(cmDocumentationEntry& entry)
{
entry.Name = this->GetName();
entry.Name = cmGlobalVisualStudio11ARMGenerator::GetActualName();
entry.Brief = "Generates Visual Studio 11 ARM project files.";
entry.Full = "";
}

View File

@ -31,6 +31,6 @@ public:
virtual const char* GetPlatformName() const {return "ARM";}
/** Get the documentation entry for this generator. */
virtual void GetDocumentation(cmDocumentationEntry& entry) const;
static void GetDocumentation(cmDocumentationEntry& entry);
};
#endif

View File

@ -43,9 +43,9 @@ cmLocalGenerator *cmGlobalVisualStudio11Generator::CreateLocalGenerator()
//----------------------------------------------------------------------------
void cmGlobalVisualStudio11Generator
::GetDocumentation(cmDocumentationEntry& entry) const
::GetDocumentation(cmDocumentationEntry& entry)
{
entry.Name = this->GetName();
entry.Name = cmGlobalVisualStudio11Generator::GetActualName();
entry.Brief = "Generates Visual Studio 11 project files.";
entry.Full = "";
}

View File

@ -33,7 +33,7 @@ public:
virtual void WriteSLNHeader(std::ostream& fout);
/** Get the documentation entry for this generator. */
virtual void GetDocumentation(cmDocumentationEntry& entry) const;
static void GetDocumentation(cmDocumentationEntry& entry);
///! create the correct local generator
virtual cmLocalGenerator *CreateLocalGenerator();

View File

@ -21,9 +21,9 @@ cmGlobalVisualStudio11Win64Generator::cmGlobalVisualStudio11Win64Generator()
//----------------------------------------------------------------------------
void cmGlobalVisualStudio11Win64Generator
::GetDocumentation(cmDocumentationEntry& entry) const
::GetDocumentation(cmDocumentationEntry& entry)
{
entry.Name = this->GetName();
entry.Name = cmGlobalVisualStudio11Win64Generator::GetActualName();
entry.Brief = "Generates Visual Studio 11 Win64 project files.";
entry.Full = "";
}

View File

@ -31,7 +31,7 @@ public:
virtual const char* GetPlatformName() const {return "x64";}
/** Get the documentation entry for this generator. */
virtual void GetDocumentation(cmDocumentationEntry& entry) const;
static void GetDocumentation(cmDocumentationEntry& entry);
virtual void AddPlatformDefinitions(cmMakefile* mf);
};

View File

@ -397,9 +397,9 @@ cmGlobalVisualStudio6Generator::WriteUtilityDepend(cmTarget* target)
//----------------------------------------------------------------------------
void cmGlobalVisualStudio6Generator
::GetDocumentation(cmDocumentationEntry& entry) const
::GetDocumentation(cmDocumentationEntry& entry)
{
entry.Name = this->GetName();
entry.Name = cmGlobalVisualStudio6Generator::GetActualName();
entry.Brief = "Generates Visual Studio 6 project files.";
entry.Full = "";
}

View File

@ -36,7 +36,7 @@ public:
static const char* GetActualName() {return "Visual Studio 6";}
/** Get the documentation entry for this generator. */
virtual void GetDocumentation(cmDocumentationEntry& entry) const;
static void GetDocumentation(cmDocumentationEntry& entry);
///! Create a local generator appropriate to this Global Generator
virtual cmLocalGenerator *CreateLocalGenerator();

View File

@ -313,9 +313,9 @@ void cmGlobalVisualStudio71Generator::WriteSLNHeader(std::ostream& fout)
//----------------------------------------------------------------------------
void cmGlobalVisualStudio71Generator
::GetDocumentation(cmDocumentationEntry& entry) const
::GetDocumentation(cmDocumentationEntry& entry)
{
entry.Name = this->GetName();
entry.Name = cmGlobalVisualStudio71Generator::GetActualName();
entry.Brief = "Generates Visual Studio .NET 2003 project files.";
entry.Full = "";
}

View File

@ -34,7 +34,7 @@ public:
static const char* GetActualName() {return "Visual Studio 7 .NET 2003";}
/** Get the documentation entry for this generator. */
virtual void GetDocumentation(cmDocumentationEntry& entry) const;
static void GetDocumentation(cmDocumentationEntry& entry);
///! Create a local generator appropriate to this Global Generator
virtual cmLocalGenerator *CreateLocalGenerator();

View File

@ -740,9 +740,9 @@ std::vector<std::string> *cmGlobalVisualStudio7Generator::GetConfigurations()
//----------------------------------------------------------------------------
void cmGlobalVisualStudio7Generator
::GetDocumentation(cmDocumentationEntry& entry) const
::GetDocumentation(cmDocumentationEntry& entry)
{
entry.Name = this->GetName();
entry.Name = cmGlobalVisualStudio7Generator::GetActualName();
entry.Brief = "Generates Visual Studio .NET 2002 project files.";
entry.Full = "";
}

View File

@ -40,7 +40,7 @@ public:
virtual cmLocalGenerator *CreateLocalGenerator();
/** Get the documentation entry for this generator. */
virtual void GetDocumentation(cmDocumentationEntry& entry) const;
static void GetDocumentation(cmDocumentationEntry& entry);
/**
* Try to determine system infomation such as shared library

View File

@ -45,9 +45,9 @@ void cmGlobalVisualStudio8Generator::WriteSLNHeader(std::ostream& fout)
//----------------------------------------------------------------------------
void cmGlobalVisualStudio8Generator
::GetDocumentation(cmDocumentationEntry& entry) const
::GetDocumentation(cmDocumentationEntry& entry)
{
entry.Name = this->GetName();
entry.Name = cmGlobalVisualStudio8Generator::GetActualName();
entry.Brief = "Generates Visual Studio 8 2005 project files.";
entry.Full = "";
}

View File

@ -36,7 +36,7 @@ public:
virtual const char* GetPlatformName() const {return "Win32";}
/** Get the documentation entry for this generator. */
virtual void GetDocumentation(cmDocumentationEntry& entry) const;
static void GetDocumentation(cmDocumentationEntry& entry);
///! Create a local generator appropriate to this Global Generator
virtual cmLocalGenerator *CreateLocalGenerator();

View File

@ -24,9 +24,9 @@ cmGlobalVisualStudio8Win64Generator::cmGlobalVisualStudio8Win64Generator()
//----------------------------------------------------------------------------
void cmGlobalVisualStudio8Win64Generator
::GetDocumentation(cmDocumentationEntry& entry) const
::GetDocumentation(cmDocumentationEntry& entry)
{
entry.Name = this->GetName();
entry.Name = cmGlobalVisualStudio8Win64Generator::GetActualName();
entry.Brief = "Generates Visual Studio 8 2005 Win64 project files.";
entry.Full = "";
}

View File

@ -37,7 +37,7 @@ public:
virtual const char* GetPlatformName() const {return "x64";}
/** Get the documentation entry for this generator. */
virtual void GetDocumentation(cmDocumentationEntry& entry) const;
static void GetDocumentation(cmDocumentationEntry& entry);
/**
* Try to determine system infomation such as shared library

View File

@ -42,9 +42,9 @@ cmLocalGenerator *cmGlobalVisualStudio9Generator::CreateLocalGenerator()
//----------------------------------------------------------------------------
void cmGlobalVisualStudio9Generator
::GetDocumentation(cmDocumentationEntry& entry) const
::GetDocumentation(cmDocumentationEntry& entry)
{
entry.Name = this->GetName();
entry.Name = cmGlobalVisualStudio9Generator::GetActualName();
entry.Brief = "Generates Visual Studio 9 2008 project files.";
entry.Full = "";
}

View File

@ -35,7 +35,7 @@ public:
static const char* GetActualName() {return "Visual Studio 9 2008";}
/** Get the documentation entry for this generator. */
virtual void GetDocumentation(cmDocumentationEntry& entry) const;
static void GetDocumentation(cmDocumentationEntry& entry);
///! create the correct local generator
virtual cmLocalGenerator *CreateLocalGenerator();

View File

@ -21,9 +21,9 @@ cmGlobalVisualStudio9IA64Generator::cmGlobalVisualStudio9IA64Generator()
//----------------------------------------------------------------------------
void cmGlobalVisualStudio9IA64Generator
::GetDocumentation(cmDocumentationEntry& entry) const
::GetDocumentation(cmDocumentationEntry& entry)
{
entry.Name = this->GetName();
entry.Name = cmGlobalVisualStudio9IA64Generator::GetActualName();
entry.Brief = "Generates Visual Studio 9 2008 Itanium project files.";
entry.Full = "";
}

View File

@ -37,7 +37,7 @@ public:
virtual const char* GetPlatformName() const {return "Itanium";}
/** Get the documentation entry for this generator. */
virtual void GetDocumentation(cmDocumentationEntry& entry) const;
static void GetDocumentation(cmDocumentationEntry& entry);
/**
* Try to determine system infomation such as shared library

View File

@ -21,9 +21,9 @@ cmGlobalVisualStudio9Win64Generator::cmGlobalVisualStudio9Win64Generator()
//----------------------------------------------------------------------------
void cmGlobalVisualStudio9Win64Generator
::GetDocumentation(cmDocumentationEntry& entry) const
::GetDocumentation(cmDocumentationEntry& entry)
{
entry.Name = this->GetName();
entry.Name = cmGlobalVisualStudio9Win64Generator::GetActualName();
entry.Brief = "Generates Visual Studio 9 2008 Win64 project files.";
entry.Full = "";
}

View File

@ -37,7 +37,7 @@ public:
virtual const char* GetPlatformName() const {return "x64";}
/** Get the documentation entry for this generator. */
virtual void GetDocumentation(cmDocumentationEntry& entry) const;
static void GetDocumentation(cmDocumentationEntry& entry);
/**
* Try to determine system infomation such as shared library

View File

@ -58,9 +58,9 @@ cmLocalGenerator *cmGlobalWatcomWMakeGenerator::CreateLocalGenerator()
//----------------------------------------------------------------------------
void cmGlobalWatcomWMakeGenerator
::GetDocumentation(cmDocumentationEntry& entry) const
::GetDocumentation(cmDocumentationEntry& entry)
{
entry.Name = this->GetName();
entry.Name = cmGlobalWatcomWMakeGenerator::GetActualName();
entry.Brief = "Generates Watcom WMake makefiles.";
entry.Full = "";
}

View File

@ -32,7 +32,7 @@ public:
static const char* GetActualName() {return "Watcom WMake";}
/** Get the documentation entry for this generator. */
virtual void GetDocumentation(cmDocumentationEntry& entry) const;
static void GetDocumentation(cmDocumentationEntry& entry);
///! Create a local generator appropriate to this Global Generator
virtual cmLocalGenerator *CreateLocalGenerator();

View File

@ -119,7 +119,7 @@ public:
virtual cmGlobalGenerator* CreateGlobalGenerator(const char* name) const;
virtual void GetDocumentation(cmDocumentationEntry& entry) const {
cmGlobalXCodeGenerator().GetDocumentation(entry); }
cmGlobalXCodeGenerator::GetDocumentation(entry); }
virtual void GetGenerators(std::vector<std::string>& names) const {
names.push_back(cmGlobalXCodeGenerator::GetActualName()); }
@ -3496,9 +3496,8 @@ const char* cmGlobalXCodeGenerator::GetCMakeCFGIntDir() const
//----------------------------------------------------------------------------
void cmGlobalXCodeGenerator::GetDocumentation(cmDocumentationEntry& entry)
const
{
entry.Name = this->GetName();
entry.Name = cmGlobalXCodeGenerator::GetActualName();
entry.Brief = "Generate Xcode project files.";
entry.Full = "";
}

View File

@ -38,7 +38,7 @@ public:
static const char* GetActualName() {return "Xcode";}
/** Get the documentation entry for this generator. */
virtual void GetDocumentation(cmDocumentationEntry& entry) const;
static void GetDocumentation(cmDocumentationEntry& entry);
///! Create a local generator appropriate to this Global Generator
virtual cmLocalGenerator *CreateLocalGenerator();