use short path to get unique path names for depend path output

This commit is contained in:
Bill Hoffman 2002-06-11 10:43:40 -04:00
parent 20308ac96a
commit 8f89fe11c7
1 changed files with 7 additions and 1 deletions

View File

@ -1387,7 +1387,13 @@ void cmUnixMakefileGenerator::OutputCheckDepends(std::ostream& fout)
{
std::string dependfile =
this->ConvertToOutputPath(cmSystemTools::CollapseFullPath(dep->c_str()).c_str());
if(emitted.insert(dependfile).second)
// use the short path function to create uniqe names
std::string shortpath;
if(!cmSystemTools::GetShortPath(dependfile.c_str(), shortpath))
{
shortpath = dependfile;
}
if(emitted.insert(shortpath).second)
{
fout << " \\\n" << dependfile ;
}