summaryrefslogtreecommitdiffstats
path: root/Source/cmDocumentation.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmDocumentation.cxx')
-rw-r--r--Source/cmDocumentation.cxx10
1 files changed, 4 insertions, 6 deletions
diff --git a/Source/cmDocumentation.cxx b/Source/cmDocumentation.cxx
index 168774a..359833c 100644
--- a/Source/cmDocumentation.cxx
+++ b/Source/cmDocumentation.cxx
@@ -217,8 +217,7 @@ bool cmDocumentation::PrintDocumentation(Type ht, std::ostream& os)
bool cmDocumentation::CreateModulesSection()
{
this->ModulesSection.push_back(cmDocumentationModulesHeader[0]);
-#ifdef CMAKE_ROOT_DIR
- std::string cmakeModules = CMAKE_ROOT_DIR;
+ std::string cmakeModules = this->CMakeRoot;
cmakeModules += "/Modules";
cmsys::Directory dir;
dir.Load(cmakeModules.c_str());
@@ -237,7 +236,6 @@ bool cmDocumentation::CreateModulesSection()
}
}
}
-#endif
cmDocumentationEntry e = { 0, 0, 0 };
this->ModulesSection.push_back(e);
return true;
@@ -997,8 +995,7 @@ bool cmDocumentation::PrintDocumentationSingleModule(std::ostream& os)
os << "Argument --help-module needs a module name.\n";
return false;
}
-#ifdef CMAKE_ROOT_DIR
- std::string cmakeModules = CMAKE_ROOT_DIR;
+ std::string cmakeModules = this->CMakeRoot;
cmakeModules += "/Modules/";
cmakeModules += this->SingleModuleName;
cmakeModules += ".cmake";
@@ -1007,12 +1004,13 @@ bool cmDocumentation::PrintDocumentationSingleModule(std::ostream& os)
this->SingleModuleName.c_str()))
{
this->PrintDocumentationCommand(os, &this->ModulesSection[0]);
+ os << "\n Defined in: ";
+ os << cmakeModules << "\n";
return true;
}
// Argument was not a module. Complain.
os << "Argument \"" << this->SingleModuleName.c_str()
<< "\" to --help-module is not a CMake module.";
-#endif
return false;
}