diff options
Diffstat (limited to 'Source/cmListFileCache.h')
-rw-r--r-- | Source/cmListFileCache.h | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/Source/cmListFileCache.h b/Source/cmListFileCache.h index f5859ec..57bf253 100644 --- a/Source/cmListFileCache.h +++ b/Source/cmListFileCache.h @@ -25,6 +25,13 @@ class cmMakefile; +struct cmCommandContext +{ + std::string Name; + long Line; + cmCommandContext(): Name(), Line(0) {} +}; + struct cmListFileArgument { enum Delimiter @@ -57,6 +64,16 @@ struct cmListFileContext std::string FilePath; long Line; cmListFileContext(): Name(), FilePath(), Line(0) {} + + static cmListFileContext FromCommandContext(cmCommandContext const& lfcc, + std::string const& fileName) + { + cmListFileContext lfc; + lfc.FilePath = fileName; + lfc.Line = lfcc.Line; + lfc.Name = lfcc.Name; + return lfc; + } }; std::ostream& operator<<(std::ostream&, cmListFileContext const&); @@ -64,7 +81,7 @@ bool operator<(const cmListFileContext& lhs, const cmListFileContext& rhs); bool operator==(cmListFileContext const& lhs, cmListFileContext const& rhs); bool operator!=(cmListFileContext const& lhs, cmListFileContext const& rhs); -struct cmListFileFunction: public cmListFileContext +struct cmListFileFunction: public cmCommandContext { std::vector<cmListFileArgument> Arguments; }; |