summaryrefslogtreecommitdiffstats
path: root/Source/cmListFileCache.h
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-09-21 17:51:35 (GMT)
committerBrad King <brad.king@kitware.com>2020-09-29 21:12:33 (GMT)
commite8b0359a4318bb682c96e527de7ed7f5be02c38f (patch)
tree5ea4137b78124e4619bb4aff1856a04b729f93fd /Source/cmListFileCache.h
parent98805494055f8fb4afc2da9f96a487987333981a (diff)
downloadCMake-e8b0359a4318bb682c96e527de7ed7f5be02c38f.zip
CMake-e8b0359a4318bb682c96e527de7ed7f5be02c38f.tar.gz
CMake-e8b0359a4318bb682c96e527de7ed7f5be02c38f.tar.bz2
cmake_language: Add signature to DEFER calls to later times
Fixes: #19575
Diffstat (limited to 'Source/cmListFileCache.h')
-rw-r--r--Source/cmListFileCache.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/Source/cmListFileCache.h b/Source/cmListFileCache.h
index 5773e6a..5617536 100644
--- a/Source/cmListFileCache.h
+++ b/Source/cmListFileCache.h
@@ -11,6 +11,8 @@
#include <utility>
#include <vector>
+#include <cm/optional>
+
#include "cmStateSnapshot.h"
/** \class cmListFileCache
@@ -72,6 +74,8 @@ public:
std::string Name;
std::string FilePath;
long Line = 0;
+ static long const DeferPlaceholderLine = -1;
+ cm::optional<std::string> DeferId;
cmListFileContext() = default;
cmListFileContext(std::string name, std::string filePath, long line)
@@ -81,13 +85,15 @@ public:
{
}
- static cmListFileContext FromCommandContext(cmCommandContext const& lfcc,
- std::string const& fileName)
+ static cmListFileContext FromCommandContext(
+ cmCommandContext const& lfcc, std::string const& fileName,
+ cm::optional<std::string> deferId = {})
{
cmListFileContext lfc;
lfc.FilePath = fileName;
lfc.Line = lfcc.Line;
lfc.Name = lfcc.Name.Original;
+ lfc.DeferId = std::move(deferId);
return lfc;
}
};