summaryrefslogtreecommitdiffstats
path: root/Source/cmFunctionBlocker.h
diff options
context:
space:
mode:
authorRegina Pfeifer <regina@mailbox.org>2019-07-30 16:15:13 (GMT)
committerRegina Pfeifer <regina@mailbox.org>2019-07-30 22:03:17 (GMT)
commitaf24e4ef6e216184b8c207728d6b0312ce3c1525 (patch)
treed6bf6ab881d5bac857339b2c0e86bb660d13d54c /Source/cmFunctionBlocker.h
parentef38ff22f71ad0ffe83db42d903d26d4a41f4114 (diff)
downloadCMake-af24e4ef6e216184b8c207728d6b0312ce3c1525.zip
CMake-af24e4ef6e216184b8c207728d6b0312ce3c1525.tar.gz
CMake-af24e4ef6e216184b8c207728d6b0312ce3c1525.tar.bz2
cmFunctionBlocker: Move common logic to base
Diffstat (limited to 'Source/cmFunctionBlocker.h')
-rw-r--r--Source/cmFunctionBlocker.h19
1 files changed, 17 insertions, 2 deletions
diff --git a/Source/cmFunctionBlocker.h b/Source/cmFunctionBlocker.h
index cd6b05d..8fc2c1c 100644
--- a/Source/cmFunctionBlocker.h
+++ b/Source/cmFunctionBlocker.h
@@ -3,6 +3,12 @@
#ifndef cmFunctionBlocker_h
#define cmFunctionBlocker_h
+#include "cmConfigure.h" // IWYU pragma: keep
+
+#include <vector>
+
+#include "cm_string_view.hxx"
+
#include "cmListFileCache.h"
class cmExecutionStatus;
@@ -14,8 +20,8 @@ public:
/**
* should a function be blocked
*/
- virtual bool IsFunctionBlocked(const cmListFileFunction& lff, cmMakefile& mf,
- cmExecutionStatus& status) = 0;
+ bool IsFunctionBlocked(cmListFileFunction const& lff,
+ cmExecutionStatus& status);
/**
* should this function blocker be removed, useful when one function adds a
@@ -39,7 +45,16 @@ public:
}
private:
+ virtual cm::string_view StartCommandName() const = 0;
+ virtual cm::string_view EndCommandName() const = 0;
+
+ virtual bool Replay(std::vector<cmListFileFunction> const& functions,
+ cmExecutionStatus& status) = 0;
+
+private:
cmListFileContext StartingContext;
+ std::vector<cmListFileFunction> Functions;
+ unsigned int ScopeDepth = 1;
};
#endif