summaryrefslogtreecommitdiffstats
path: root/Source/cmOrderDirectories.h
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-12-01 15:57:33 (GMT)
committerBrad King <brad.king@kitware.com>2015-12-01 16:00:32 (GMT)
commit4e3cf8b012404e4d9602c16d473480cc3d0c7928 (patch)
tree5621f044e6587bafdc03092e2967dcd70bd9dbe9 /Source/cmOrderDirectories.h
parent6b1852874325520a418eb05ec3c2149c2eb194a2 (diff)
downloadCMake-4e3cf8b012404e4d9602c16d473480cc3d0c7928.zip
CMake-4e3cf8b012404e4d9602c16d473480cc3d0c7928.tar.gz
CMake-4e3cf8b012404e4d9602c16d473480cc3d0c7928.tar.bz2
cmOrderDirectories: Reduce repeat realpath() calls
Since commit v3.1.0-rc1~110^2 (Tolerate symlinks during RPATH ordering, 2014-09-09) we call realpath() for every directory ordering constraint check. On some platforms/filesystems this is slow, so memoize the result of the call for each directory.
Diffstat (limited to 'Source/cmOrderDirectories.h')
-rw-r--r--Source/cmOrderDirectories.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/Source/cmOrderDirectories.h b/Source/cmOrderDirectories.h
index 0657e92..477216b 100644
--- a/Source/cmOrderDirectories.h
+++ b/Source/cmOrderDirectories.h
@@ -83,6 +83,9 @@ private:
// Compare directories after resolving symlinks.
bool IsSameDirectory(std::string const& l, std::string const& r);
+ std::string const& GetRealPath(std::string const& dir);
+ std::map<std::string, std::string> RealPaths;
+
friend class cmOrderDirectoriesConstraint;
friend class cmOrderDirectoriesConstraintLibrary;
};