summaryrefslogtreecommitdiff
path: root/Source/cmOrderDirectories.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmOrderDirectories.cxx')
-rw-r--r--Source/cmOrderDirectories.cxx13
1 files changed, 9 insertions, 4 deletions
diff --git a/Source/cmOrderDirectories.cxx b/Source/cmOrderDirectories.cxx
index 35ee127093..94912049be 100644
--- a/Source/cmOrderDirectories.cxx
+++ b/Source/cmOrderDirectories.cxx
@@ -73,10 +73,8 @@ public:
{
// Check if this directory conflicts with the entry.
std::string const& dir = this->OD->OriginalDirectories[i];
- if(dir != this->Directory &&
- cmSystemTools::GetRealPath(dir) !=
- cmSystemTools::GetRealPath(this->Directory) &&
- this->FindConflict(dir))
+ if (!this->OD->IsSameDirectory(dir, this->Directory) &&
+ this->FindConflict(dir))
{
// The library will be found in this directory but this is not
// the directory named for it. Add an entry to make sure the
@@ -639,3 +637,10 @@ void cmOrderDirectories::DiagnoseCycle()
->IssueMessage(cmake::WARNING, e.str(),
this->Target->Target->GetBacktrace());
}
+
+bool cmOrderDirectories::IsSameDirectory(std::string const& l,
+ std::string const& r)
+{
+ return (l == r ||
+ cmSystemTools::GetRealPath(l) == cmSystemTools::GetRealPath(r));
+}