summaryrefslogtreecommitdiffstats
path: root/Source/cmDocumentation.h
diff options
context:
space:
mode:
authorAlexander Neundorf <neundorf@kde.org>2007-09-19 17:14:25 (GMT)
committerAlexander Neundorf <neundorf@kde.org>2007-09-19 17:14:25 (GMT)
commit31881265c7651af289e1ebbe20946ae78f067222 (patch)
tree59abed1f6fcf0314a7999e0da9e268384e7a7e55 /Source/cmDocumentation.h
parenta581b643307a7cdc98889b40d35cc09f1806aace (diff)
downloadCMake-31881265c7651af289e1ebbe20946ae78f067222.zip
CMake-31881265c7651af289e1ebbe20946ae78f067222.tar.gz
CMake-31881265c7651af289e1ebbe20946ae78f067222.tar.bz2
ENH: add new help option --help-custom-modules, which generates
documentation for all modules found in CMAKE_MODULE_PATH, which currently has to be specified via -D, this can later on be improved e.g. by reading a special (to-be-created) file like CMakeFiles/ModulePath.cmake in the build tree so that running cmake help in the build tree of a project will always give you the current module path. (This could actually also help IDEs which would like to support cmake for projects...) Alex
Diffstat (limited to 'Source/cmDocumentation.h')
-rw-r--r--Source/cmDocumentation.h19
1 files changed, 18 insertions, 1 deletions
diff --git a/Source/cmDocumentation.h b/Source/cmDocumentation.h
index 90e6e69..c6f5444 100644
--- a/Source/cmDocumentation.h
+++ b/Source/cmDocumentation.h
@@ -26,6 +26,11 @@
#include "cmDocumentationFormatterUsage.h"
+namespace cmsys
+{
+ class Directory;
+}
+
/** Class to generate documentation. */
class cmDocumentation: public cmDocumentationEnums
{
@@ -157,14 +162,21 @@ public:
/** Set cmake root so we can find installed files */
void SetCMakeRoot(const char* root) { this->CMakeRoot = root;}
+
+ /** Set CMAKE_MODULE_PATH so we can find additional cmake modules */
+ void SetCMakeModulePath(const char* path) { this->CMakeModulePath = path;}
static Form GetFormFromFilename(const std::string& filename);
private:
void SetForm(Form f);
- bool CreateSingleModule(const char* fname, const char* moduleName);
+ bool CreateSingleModule(const char* fname,
+ const char* moduleName,
+ cmSection &moduleSection);
+ void CreateModuleDocsForDir(cmsys::Directory& dir, cmSection &moduleSection);
bool CreateModulesSection();
+ bool CreateCustomModulesSection();
bool PrintCopyright(std::ostream& os);
bool PrintVersion(std::ostream& os);
bool PrintDocumentationList(std::ostream& os);
@@ -176,6 +188,7 @@ private:
bool PrintDocumentationUsage(std::ostream& os);
bool PrintDocumentationFull(std::ostream& os);
bool PrintDocumentationModules(std::ostream& os);
+ bool PrintDocumentationCustomModules(std::ostream& os);
bool PrintDocumentationProperties(std::ostream& os);
bool PrintDocumentationCurrentCommands(std::ostream& os);
bool PrintDocumentationCompatCommands(std::ostream& os);
@@ -187,6 +200,7 @@ private:
void CreateCurrentCommandsDocumentation();
void CreateCompatCommandsDocumentation();
void CreateModulesDocumentation();
+ void CreateCustomModulesDocumentation();
void CreatePropertiesDocumentation();
void SetSection(const cmDocumentationEntry* header,
@@ -204,6 +218,7 @@ private:
cmSection CommandsSection;
cmSection CompatCommandsSection;
cmSection ModulesSection;
+ cmSection CustomModulesSection;
cmSection GeneratorsSection;
cmSection SeeAlsoSection;
cmSection CopyrightSection;
@@ -219,6 +234,8 @@ private:
std::string SeeAlsoString;
std::string CMakeRoot;
+ std::string CMakeModulePath;
+ std::set<std::string> ModulesFound;
std::vector< char* > ModuleStrings;
std::vector< const char* > Names;
std::vector< const cmDocumentationEntry* > Sections;