diff options
author | Ken Martin <ken.martin@kitware.com> | 2008-03-04 14:16:33 (GMT) |
---|---|---|
committer | Ken Martin <ken.martin@kitware.com> | 2008-03-04 14:16:33 (GMT) |
commit | d47a5951edf48738db67dac22eef24de948965ec (patch) | |
tree | af6bc1dfefda26763e188227c276a811910ba9da /Source/cmPolicies.cxx | |
parent | efb309fe2981f7030946b057544bc6c413c74744 (diff) | |
download | CMake-d47a5951edf48738db67dac22eef24de948965ec.zip CMake-d47a5951edf48738db67dac22eef24de948965ec.tar.gz CMake-d47a5951edf48738db67dac22eef24de948965ec.tar.bz2 |
ENH: add --help-policies and --help-policy command line options
Diffstat (limited to 'Source/cmPolicies.cxx')
-rw-r--r-- | Source/cmPolicies.cxx | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/Source/cmPolicies.cxx b/Source/cmPolicies.cxx index bbd3913..1f5da47 100644 --- a/Source/cmPolicies.cxx +++ b/Source/cmPolicies.cxx @@ -409,3 +409,23 @@ cmPolicies::GetPolicyStatus(cmPolicies::PolicyID id) return pos->second->Status; } +void cmPolicies::GetDocumentation(std::vector<cmDocumentationEntry>& v) +{ + // now loop over all the policies and set them as appropriate + std::map<cmPolicies::PolicyID,cmPolicy *>::iterator i + = this->Policies.begin(); + for (;i != this->Policies.end(); ++i) + { + std::string full; + full += i->second->LongDescription; + // add in some more text here based on status + // switch (i->second->Status) + // { + // case cmPolicies::WARN: + + cmDocumentationEntry e(i->second->IDString.c_str(), + i->second->ShortDescription.c_str(), + full.c_str()); + v.push_back(e); + } +} |