1 /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
2 file Copyright.txt or https://cmake.org/licensing for details. */
5 #include "cmConfigure.h" // IWYU pragma: keep
9 #include <cm/string_view>
11 #include "cmListFileCache.h"
13 class cmExecutionStatus;
16 class cmFunctionBlocker
20 * should a function be blocked
22 bool IsFunctionBlocked(cmListFileFunction const& lff,
23 cmExecutionStatus& status);
25 virtual ~cmFunctionBlocker() = default;
27 /** Set/Get the context in which this blocker is created. */
28 void SetStartingContext(cmListFileContext const& lfc)
30 this->StartingContext = lfc;
32 cmListFileContext const& GetStartingContext() const
34 return this->StartingContext;
38 virtual cm::string_view StartCommandName() const = 0;
39 virtual cm::string_view EndCommandName() const = 0;
41 virtual bool ArgumentsMatch(cmListFileFunction const& lff,
42 cmMakefile& mf) const = 0;
44 virtual bool Replay(std::vector<cmListFileFunction> functions,
45 cmExecutionStatus& status) = 0;
47 cmListFileContext StartingContext;
48 std::vector<cmListFileFunction> Functions;
49 unsigned int ScopeDepth = 1;