summaryrefslogtreecommitdiffstats
path: root/Source/cmDocumentation.cxx
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2006-04-14 03:15:48 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2006-04-14 03:15:48 (GMT)
commit96a46bdb441226cdc89b1dd65cc65bf4ff771bac (patch)
tree0a399916d4707f65c4a69f7fbd2ebbd8736b9dbc /Source/cmDocumentation.cxx
parentac242e319bb4a7d6d31f83752687ceb3ea6890a8 (diff)
downloadCMake-96a46bdb441226cdc89b1dd65cc65bf4ff771bac.zip
CMake-96a46bdb441226cdc89b1dd65cc65bf4ff771bac.tar.gz
CMake-96a46bdb441226cdc89b1dd65cc65bf4ff771bac.tar.bz2
ENH: search for help modules in the correct place for install and source tree builds
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;
}