summaryrefslogtreecommitdiff
path: root/Source/cmListFileCache.h
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2014-03-12 17:59:42 -0400
committerBen Boeckel <ben.boeckel@kitware.com>2014-06-05 12:44:19 -0400
commit2a1b2d848693a3860f8e5f179b6c97f8c56abede (patch)
tree7987c9ba6b2be8fa15a6e7c9fe820ce512554f7e /Source/cmListFileCache.h
parenta08292059eba4fdded6643b225640ebf559b2dac (diff)
downloadcmake-2a1b2d848693a3860f8e5f179b6c97f8c56abede.tar.gz
backtrace: Convert to local paths in IssueMessage
This is the only place we care show the FilePath to the user, so defer the expensive relative path calculation until here.
Diffstat (limited to 'Source/cmListFileCache.h')
-rw-r--r--Source/cmListFileCache.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/Source/cmListFileCache.h b/Source/cmListFileCache.h
index bede25e658..2ca9b8ea0a 100644
--- a/Source/cmListFileCache.h
+++ b/Source/cmListFileCache.h
@@ -14,6 +14,8 @@
#include "cmStandardIncludes.h"
+class cmLocalGenerator;
+
/** \class cmListFileCache
* \brief A class to cache list file contents.
*
@@ -66,7 +68,20 @@ struct cmListFileFunction: public cmListFileContext
std::vector<cmListFileArgument> Arguments;
};
-class cmListFileBacktrace: public std::vector<cmListFileContext> {};
+class cmListFileBacktrace: public std::vector<cmListFileContext>
+{
+ public:
+ cmListFileBacktrace(cmLocalGenerator* localGen)
+ : LocalGenerator(localGen)
+ , Relative(localGen ? false : true)
+ {
+ }
+
+ void MakeRelative();
+ private:
+ cmLocalGenerator* LocalGenerator;
+ bool Relative;
+};
struct cmListFile
{