summaryrefslogtreecommitdiffstats
path: root/Source/CPack
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2006-05-02 21:52:22 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2006-05-02 21:52:22 (GMT)
commit6597cc48089afca7dcefe167aee17f58bd187cae (patch)
tree5b0f45afe8d1cf672073bea51dd9e6e3e144c679 /Source/CPack
parent7e788fed35074f0befde72d924621392f020f794 (diff)
downloadCMake-6597cc48089afca7dcefe167aee17f58bd187cae.zip
CMake-6597cc48089afca7dcefe167aee17f58bd187cae.tar.gz
CMake-6597cc48089afca7dcefe167aee17f58bd187cae.tar.bz2
ENH: Add generators documentation
Diffstat (limited to 'Source/CPack')
-rw-r--r--Source/CPack/cmCPackGenerators.cxx23
-rw-r--r--Source/CPack/cmCPackGenerators.h6
-rw-r--r--Source/CPack/cpack.cxx17
3 files changed, 40 insertions, 6 deletions
diff --git a/Source/CPack/cmCPackGenerators.cxx b/Source/CPack/cmCPackGenerators.cxx
index ed153af..79c0430 100644
--- a/Source/CPack/cmCPackGenerators.cxx
+++ b/Source/CPack/cmCPackGenerators.cxx
@@ -30,13 +30,22 @@
//----------------------------------------------------------------------
cmCPackGenerators::cmCPackGenerators()
{
- this->RegisterGenerator("TGZ", cmCPackTGZGenerator::CreateGenerator);
- this->RegisterGenerator("STGZ", cmCPackSTGZGenerator::CreateGenerator);
- this->RegisterGenerator("NSIS", cmCPackNSISGenerator::CreateGenerator);
- this->RegisterGenerator("ZIP", cmCPackZIPGenerator::CreateGenerator);
- this->RegisterGenerator("TZ", cmCPackTarCompressGenerator::CreateGenerator);
- this->RegisterGenerator("PackageMaker",
+ this->RegisterGenerator("TGZ", "Tar GZip compression",
+ cmCPackTGZGenerator::CreateGenerator);
+ this->RegisterGenerator("STGZ", "Self extracting Tar GZip compression",
+ cmCPackSTGZGenerator::CreateGenerator);
+#ifdef _WIN32
+ this->RegisterGenerator("NSIS", "Null Soft Installer",
+ cmCPackNSISGenerator::CreateGenerator);
+#endif
+ this->RegisterGenerator("ZIP", "ZIP file format",
+ cmCPackZIPGenerator::CreateGenerator);
+ this->RegisterGenerator("TZ", "Tar Compress compression",
+ cmCPackTarCompressGenerator::CreateGenerator);
+#ifdef __APPLE__
+ this->RegisterGenerator("PackageMaker", "Mac OSX Package Maker compression",
cmCPackPackageMakerGenerator::CreateGenerator);
+#endif
}
//----------------------------------------------------------------------
@@ -81,6 +90,7 @@ cmCPackGenericGenerator* cmCPackGenerators::NewGeneratorInternal(
//----------------------------------------------------------------------
void cmCPackGenerators::RegisterGenerator(const char* name,
+ const char* generatorDescription,
CreateGeneratorCall* createGenerator)
{
if ( !name || !createGenerator )
@@ -90,4 +100,5 @@ void cmCPackGenerators::RegisterGenerator(const char* name,
return;
}
this->GeneratorCreators[name] = createGenerator;
+ this->GeneratorDescriptions[name] = generatorDescription;
}
diff --git a/Source/CPack/cmCPackGenerators.h b/Source/CPack/cmCPackGenerators.h
index d100e9b..76a1697 100644
--- a/Source/CPack/cmCPackGenerators.h
+++ b/Source/CPack/cmCPackGenerators.h
@@ -42,16 +42,22 @@ public:
typedef cmCPackGenericGenerator* CreateGeneratorCall();
void RegisterGenerator(const char* name,
+ const char* generatorDescription,
CreateGeneratorCall* createGenerator);
void SetLogger(cmCPackLog* logger) { this->Logger = logger; }
+ typedef std::map<cmStdString, cmStdString> DescriptionsMap;
+ const DescriptionsMap& GetGeneratorsList() const
+ { return this->GeneratorDescriptions; }
+
private:
cmCPackGenericGenerator* NewGeneratorInternal(const char* name);
std::vector<cmCPackGenericGenerator*> Generators;
typedef std::map<cmStdString, CreateGeneratorCall*> t_GeneratorCreatorsMap;
t_GeneratorCreatorsMap GeneratorCreators;
+ DescriptionsMap GeneratorDescriptions;
cmCPackLog* Logger;
};
diff --git a/Source/CPack/cpack.cxx b/Source/CPack/cpack.cxx
index fa4afb1..8111d22 100644
--- a/Source/CPack/cpack.cxx
+++ b/Source/CPack/cpack.cxx
@@ -376,6 +376,23 @@ int main (int argc, char *argv[])
doc.SetUsageSection(cmDocumentationUsage);
doc.SetDescriptionSection(cmDocumentationDescription);
doc.SetOptionsSection(cmDocumentationOptions);
+
+ std::vector<cmDocumentationEntry> v;
+ cmCPackGenerators::DescriptionsMap::const_iterator generatorIt;
+ for( generatorIt = generators.GetGeneratorsList().begin();
+ generatorIt != generators.GetGeneratorsList().end();
+ ++ generatorIt )
+ {
+ cmDocumentationEntry e;
+ e.name = generatorIt->first.c_str();
+ e.brief = generatorIt->second.c_str();
+ e.full = "";
+ v.push_back(e);
+ }
+ cmDocumentationEntry empty = {0,0,0};
+ v.push_back(empty);
+ doc.SetGeneratorsSection(&v[0]);
+
doc.SetSeeAlsoList(cmDocumentationSeeAlso);
#undef cout
return doc.PrintRequestedDocumentation(std::cout)? 0:1;