diff options
Diffstat (limited to 'Source/cmSourceFileLocation.cxx')
-rw-r--r-- | Source/cmSourceFileLocation.cxx | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/Source/cmSourceFileLocation.cxx b/Source/cmSourceFileLocation.cxx index 1c2454e..b81951d 100644 --- a/Source/cmSourceFileLocation.cxx +++ b/Source/cmSourceFileLocation.cxx @@ -63,7 +63,7 @@ cmSourceFileLocation if (cmSystemTools::FileIsFullPath(this->Directory.c_str())) { this->Directory - = cmSystemTools::CollapseFullPath(this->Directory.c_str()); + = cmSystemTools::CollapseFullPath(this->Directory); } this->Name = cmSystemTools::GetFilenameName(name); this->UpdateExtension(name); @@ -92,7 +92,7 @@ void cmSourceFileLocation::DirectoryUseSource() { this->Directory = cmSystemTools::CollapseFullPath( - this->Directory.c_str(), this->Makefile->GetCurrentDirectory()); + this->Directory, this->Makefile->GetCurrentDirectory()); this->AmbiguousDirectory = false; } } @@ -105,7 +105,7 @@ void cmSourceFileLocation::DirectoryUseBinary() { this->Directory = cmSystemTools::CollapseFullPath( - this->Directory.c_str(), this->Makefile->GetCurrentOutputDirectory()); + this->Directory, this->Makefile->GetCurrentOutputDirectory()); this->AmbiguousDirectory = false; } } @@ -216,7 +216,8 @@ bool cmSourceFileLocation::Matches(cmSourceFileLocation const& loc) // Both extensions are similarly ambiguous. Since only the old fixed set // of extensions will be tried, the names must match at this point to be // the same file. - if(this->Name.size() != loc.Name.size() || this->Name != loc.Name) + if(this->Name.size() != loc.Name.size() || + !cmSystemTools::ComparePath(this->Name, loc.Name)) { return false; } @@ -280,10 +281,10 @@ bool cmSourceFileLocation::Matches(cmSourceFileLocation const& loc) // Compare possible directory combinations. std::string const& srcDir = cmSystemTools::CollapseFullPath( - this->Directory.c_str(), this->Makefile->GetCurrentDirectory()); + this->Directory, this->Makefile->GetCurrentDirectory()); std::string const& binDir = cmSystemTools::CollapseFullPath( - this->Directory.c_str(), this->Makefile->GetCurrentOutputDirectory()); + this->Directory, this->Makefile->GetCurrentOutputDirectory()); if(srcDir != loc.Directory && binDir != loc.Directory) { @@ -295,10 +296,10 @@ bool cmSourceFileLocation::Matches(cmSourceFileLocation const& loc) // Compare possible directory combinations. std::string const& srcDir = cmSystemTools::CollapseFullPath( - loc.Directory.c_str(), loc.Makefile->GetCurrentDirectory()); + loc.Directory, loc.Makefile->GetCurrentDirectory()); std::string const& binDir = cmSystemTools::CollapseFullPath( - loc.Directory.c_str(), loc.Makefile->GetCurrentOutputDirectory()); + loc.Directory, loc.Makefile->GetCurrentOutputDirectory()); if(srcDir != this->Directory && binDir != this->Directory) { |