cmFunctionCommand.h 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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 cmFunctionCommand_h
  4. #define cmFunctionCommand_h
  5. #include "cmConfigure.h" // IWYU pragma: keep
  6. #include <string>
  7. #include <vector>
  8. #include "cmCommand.h"
  9. #include "cmFunctionBlocker.h"
  10. #include "cmListFileCache.h"
  11. class cmExecutionStatus;
  12. class cmMakefile;
  13. class cmFunctionFunctionBlocker : public cmFunctionBlocker
  14. {
  15. public:
  16. bool IsFunctionBlocked(const cmListFileFunction&, cmMakefile& mf,
  17. cmExecutionStatus&) override;
  18. bool ShouldRemove(const cmListFileFunction&, cmMakefile& mf) override;
  19. std::vector<std::string> Args;
  20. std::vector<cmListFileFunction> Functions;
  21. int Depth = 0;
  22. };
  23. /// Starts function() ... endfunction() block
  24. class cmFunctionCommand : public cmCommand
  25. {
  26. public:
  27. /**
  28. * This is a virtual constructor for the command.
  29. */
  30. cmCommand* Clone() override { return new cmFunctionCommand; }
  31. /**
  32. * This is called when the command is first encountered in
  33. * the CMakeLists.txt file.
  34. */
  35. bool InitialPass(std::vector<std::string> const& args,
  36. cmExecutionStatus& status) override;
  37. };
  38. #endif