diff options
author | Ken Martin <ken.martin@kitware.com> | 2001-04-27 13:30:27 (GMT) |
---|---|---|
committer | Ken Martin <ken.martin@kitware.com> | 2001-04-27 13:30:27 (GMT) |
commit | 07bd60f6b3db36fdaf13661f70e8bb7507317254 (patch) | |
tree | 49f5022c7eb6286791ffc548e1638ada5122c4cc /Source/cmFindLibraryCommand.cxx | |
parent | dbdf1c356bbacb5142a1d7bb145bcd26a6fd6a9c (diff) | |
download | CMake-07bd60f6b3db36fdaf13661f70e8bb7507317254.zip CMake-07bd60f6b3db36fdaf13661f70e8bb7507317254.tar.gz CMake-07bd60f6b3db36fdaf13661f70e8bb7507317254.tar.bz2 |
better help strings
Diffstat (limited to 'Source/cmFindLibraryCommand.cxx')
-rw-r--r-- | Source/cmFindLibraryCommand.cxx | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/Source/cmFindLibraryCommand.cxx b/Source/cmFindLibraryCommand.cxx index 7c7b666..42de715 100644 --- a/Source/cmFindLibraryCommand.cxx +++ b/Source/cmFindLibraryCommand.cxx @@ -51,6 +51,8 @@ bool cmFindLibraryCommand::Invoke(std::vector<std::string>& 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 = "Where can the "; + helpString += args[1] + " library be found"; const char* cacheValue = cmCacheManager::GetInstance()->GetCacheValue(args[0].c_str()); if(cacheValue) @@ -58,6 +60,10 @@ bool cmFindLibraryCommand::Invoke(std::vector<std::string>& args) if(strcmp(cacheValue, "NOTFOUND") != 0) { m_Makefile->AddDefinition(args[0].c_str(), cacheValue); + cmCacheManager::GetInstance()->AddCacheEntry(args[0].c_str(), + cacheValue, + helpString.c_str(), + cmCacheManager::PATH); } return true; } @@ -86,7 +92,7 @@ bool cmFindLibraryCommand::Invoke(std::vector<std::string>& args) m_Makefile->AddDefinition(args[0].c_str(), path[k].c_str()); cmCacheManager::GetInstance()->AddCacheEntry(args[0].c_str(), path[k].c_str(), - "Path to a library", + helpString.c_str(), cmCacheManager::PATH); return true; } @@ -96,7 +102,7 @@ bool cmFindLibraryCommand::Invoke(std::vector<std::string>& args) m_Makefile->AddDefinition(args[0].c_str(), path[k].c_str()); cmCacheManager::GetInstance()->AddCacheEntry(args[0].c_str(), path[k].c_str(), - "Path to a library", + helpString.c_str(), cmCacheManager::PATH); return true; } @@ -106,7 +112,7 @@ bool cmFindLibraryCommand::Invoke(std::vector<std::string>& args) m_Makefile->AddDefinition(args[0].c_str(), path[k].c_str()); cmCacheManager::GetInstance()->AddCacheEntry(args[0].c_str(), path[k].c_str(), - "Path to a library", + helpString.c_str(), cmCacheManager::PATH); return true; } @@ -117,25 +123,15 @@ bool cmFindLibraryCommand::Invoke(std::vector<std::string>& args) cmCacheManager::GetInstance()-> AddCacheEntry(args[0].c_str(), path[k].c_str(), - "Path to a library.", + helpString.c_str(), cmCacheManager::PATH); return true; } } cmCacheManager::GetInstance()->AddCacheEntry(args[0].c_str(), "NOTFOUND", - "Path to a library", + helpString.c_str(), cmCacheManager::PATH); - std::string message = "Library not found: "; - message += args[1]; - message += "\n"; - message += "looked in "; - for(k=0; k < path.size(); k++) - { - message += path[k]; - message += "\n"; - } - this->SetError(message.c_str()); return false; } |