diff options
author | Bill Hoffman <bill.hoffman@kitware.com> | 2001-11-26 23:24:47 (GMT) |
---|---|---|
committer | Bill Hoffman <bill.hoffman@kitware.com> | 2001-11-26 23:24:47 (GMT) |
commit | 3e24edcd04234c20a5c3045a7af9ff482fd61a45 (patch) | |
tree | 8b42271abfc9a7b04bdd27ecf6d678bb8672c0ad /Source/cmFindPathCommand.cxx | |
parent | b170d21c9893c33b44d34ed0dedc81de1baec039 (diff) | |
download | CMake-3e24edcd04234c20a5c3045a7af9ff482fd61a45.zip CMake-3e24edcd04234c20a5c3045a7af9ff482fd61a45.tar.gz CMake-3e24edcd04234c20a5c3045a7af9ff482fd61a45.tar.bz2 |
ENH: add possibility to add doc strings to varibles created by find type commands
Diffstat (limited to 'Source/cmFindPathCommand.cxx')
-rw-r--r-- | Source/cmFindPathCommand.cxx | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/Source/cmFindPathCommand.cxx b/Source/cmFindPathCommand.cxx index c4abd46..2a65e84 100644 --- a/Source/cmFindPathCommand.cxx +++ b/Source/cmFindPathCommand.cxx @@ -42,9 +42,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "cmCacheManager.h" // cmFindPathCommand -bool cmFindPathCommand::InitialPass(std::vector<std::string> const& args) +bool cmFindPathCommand::InitialPass(std::vector<std::string> const& argsIn) { - if(args.size() < 2) + if(argsIn.size() < 2) { this->SetError("called with incorrect number of arguments"); return false; @@ -53,7 +53,24 @@ bool cmFindPathCommand::InitialPass(std::vector<std::string> const& args) // Now check and see if the value has been stored in the cache // already, if so use that value and don't look for the program std::string helpString = "What is the path where the file "; - helpString += args[1] + " can be found"; + helpString += argsIn[1] + " can be found"; + std::vector<std::string> args; + unsigned int size = argsIn.size(); + for(unsigned int j = 0; j < size; ++j) + { + if(argsIn[j] != "DOC") + { + args.push_back(argsIn[j]); + } + else + { + if(j+1 < size) + { + helpString = argsIn[j+1]; + } + break; + } + } const char* cacheValue = m_Makefile->GetDefinition(args[0].c_str()); if(cacheValue && strcmp(cacheValue, "NOTFOUND")) |