BUG: fix for 0008378, lists with FILEPATH and UNC //server/path fail

This commit is contained in:
Bill Hoffman 2009-02-09 08:25:55 -05:00
parent 37428e32aa
commit 67ddd0c837
1 changed files with 18 additions and 1 deletions

View File

@ -784,7 +784,24 @@ void cmCacheManager::AddCacheEntry(const char* key,
// make sure we only use unix style paths // make sure we only use unix style paths
if(type == FILEPATH || type == PATH) if(type == FILEPATH || type == PATH)
{ {
cmSystemTools::ConvertToUnixSlashes(e.Value); if(e.Value.find(';') != e.Value.npos)
{
std::vector<std::string> paths;
cmSystemTools::ExpandListArgument(e.Value, paths);
const char* sep = "";
for(std::vector<std::string>::iterator i = paths.begin();
i != paths.end(); ++i)
{
cmSystemTools::ConvertToUnixSlashes(*i);
e.Value += sep;
e.Value += *i;
sep = ";";
}
}
else
{
cmSystemTools::ConvertToUnixSlashes(e.Value);
}
} }
if ( helpString ) if ( helpString )
{ {