cmIfCommand.h 957 B

1234567891011121314151617181920212223242526272829303132333435
  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 cmIfCommand_h
  4. #define cmIfCommand_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 cmIfFunctionBlocker : public cmFunctionBlocker
  12. {
  13. public:
  14. bool IsFunctionBlocked(const cmListFileFunction& lff, cmMakefile& mf,
  15. cmExecutionStatus&) override;
  16. bool ShouldRemove(const cmListFileFunction& lff, cmMakefile& mf) override;
  17. std::vector<cmListFileArgument> Args;
  18. std::vector<cmListFileFunction> Functions;
  19. bool IsBlocking;
  20. bool HasRun = false;
  21. bool ElseSeen = false;
  22. unsigned int ScopeDepth = 0;
  23. };
  24. /// Starts an if block
  25. bool cmIfCommand(std::vector<cmListFileArgument> const& args,
  26. cmExecutionStatus& status);
  27. #endif