cmWhileCommand.h 1009 B

12345678910111213141516171819202122232425262728293031323334353637
  1. /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
  2. file Copyright.txt or https://cmake.org/licensing for details. */
  3. #ifndef cmWhileCommand_h
  4. #define cmWhileCommand_h
  5. #include "cmConfigure.h" // IWYU pragma: keep
  6. #include <vector>
  7. #include "cmFunctionBlocker.h"
  8. #include "cmListFileCache.h"
  9. class cmExecutionStatus;
  10. class cmMakefile;
  11. class cmWhileFunctionBlocker : public cmFunctionBlocker
  12. {
  13. public:
  14. cmWhileFunctionBlocker(cmMakefile* mf);
  15. ~cmWhileFunctionBlocker() override;
  16. bool IsFunctionBlocked(const cmListFileFunction& lff, cmMakefile& mf,
  17. cmExecutionStatus&) override;
  18. bool ShouldRemove(const cmListFileFunction& lff, cmMakefile& mf) override;
  19. std::vector<cmListFileArgument> Args;
  20. std::vector<cmListFileFunction> Functions;
  21. private:
  22. cmMakefile* Makefile;
  23. int Depth;
  24. };
  25. /// \brief Starts a while loop
  26. bool cmWhileCommand(std::vector<cmListFileArgument> const& args,
  27. cmExecutionStatus& status);
  28. #endif