BUG: VS7 seems to have a limit on the length of the link directory list string. Try to make the string as short as possible by avoiding trailing slashes and using a relative path (if it is shorter).
This commit is contained in:
parent
31875743e9
commit
350c3efe7b
|
@ -864,19 +864,33 @@ cmLocalVisualStudio7Generator
|
|||
for(std::vector<cmStdString>::const_iterator d = dirs.begin();
|
||||
d != dirs.end(); ++d)
|
||||
{
|
||||
// Remove any trailing slash and skip empty paths.
|
||||
std::string dir = *d;
|
||||
if(!dir.empty())
|
||||
if(dir[dir.size()-1] == '/')
|
||||
{
|
||||
if(dir[dir.size()-1] != '/')
|
||||
{
|
||||
dir += "/";
|
||||
dir = dir.substr(0, dir.size()-1);
|
||||
}
|
||||
dir += "$(OutDir)";
|
||||
fout << comma << this->ConvertToXMLOutputPath(dir.c_str())
|
||||
<< "," << this->ConvertToXMLOutputPath(d->c_str());
|
||||
if(dir.empty())
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
// Switch to a relative path specification if it is shorter.
|
||||
if(cmSystemTools::FileIsFullPath(dir.c_str()))
|
||||
{
|
||||
std::string rel = this->Convert(dir.c_str(), START_OUTPUT, UNCHANGED);
|
||||
if(rel.size() < dir.size())
|
||||
{
|
||||
dir = rel;
|
||||
}
|
||||
}
|
||||
|
||||
// First search a configuration-specific subdirectory and then the
|
||||
// original directory.
|
||||
fout << comma << this->ConvertToXMLOutputPath((dir+"/$(OutDir)").c_str())
|
||||
<< "," << this->ConvertToXMLOutputPath(dir.c_str());
|
||||
comma = ",";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
|
|
Loading…
Reference in New Issue