mirror of
https://github.com/Kitware/CMake.git
synced 2026-05-01 11:50:11 -05:00
cmSourceFileLocation: Collapse full path for directory comparisons.
Otherwise Matches() ends up doing a comparison of the directories /path/to/dir/subdir/.. and /path/to/dir as strings and not matching where it should.
This commit is contained in:
@@ -60,6 +60,11 @@ cmSourceFileLocation
|
||||
this->AmbiguousDirectory = !cmSystemTools::FileIsFullPath(name.c_str());
|
||||
this->AmbiguousExtension = true;
|
||||
this->Directory = cmSystemTools::GetFilenamePath(name);
|
||||
if (cmSystemTools::FileIsFullPath(this->Directory.c_str()))
|
||||
{
|
||||
this->Directory
|
||||
= cmSystemTools::CollapseFullPath(this->Directory.c_str());
|
||||
}
|
||||
this->Name = cmSystemTools::GetFilenameName(name);
|
||||
this->UpdateExtension(name);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user