cmake: resolve symlinks when comparing source directories.

Testcase: trying to use an existing build dir which was
made for /d/foo where /d is a symlink to $HOME/d.

To help understanding the problem, the error message now prints
both source dirs, the one found in the builddir and the one we expected.

Change-Id: I9a24fbd6ef3cf8108c5edba0d2a5b99ecdea0e89
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
David Faure
2016-06-18 15:11:12 +02:00
parent ff2ba0cef5
commit 52ed384549
3 changed files with 24 additions and 5 deletions

View File

@@ -109,6 +109,7 @@ public:
QString *error = 0, const std::function<bool (QFileInfo, QFileInfo, QString *)> &copyHelper = std::function<bool (QFileInfo, QFileInfo, QString *)>());
static bool isFileNewerThan(const FileName &filePath, const QDateTime &timeStamp);
static FileName resolveSymlinks(const FileName &path);
static FileName canonicalPath(const FileName &path);
static QString shortNativePath(const FileName &path);
static QString fileSystemFriendlyName(const QString &name);
static int indexOfQmakeUnfriendly(const QString &name, int startpos = 0);