cmEndWhileCommand.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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 cmEndWhileCommand_h
  4. #define cmEndWhileCommand_h
  5. #include "cmCommand.h"
  6. /** \class cmEndWhileCommand
  7. * \brief ends a while loop
  8. *
  9. * cmEndWhileCommand ends a while loop
  10. */
  11. class cmEndWhileCommand : public cmCommand
  12. {
  13. public:
  14. /**
  15. * This is a virtual constructor for the command.
  16. */
  17. cmCommand* Clone() CM_OVERRIDE { return new cmEndWhileCommand; }
  18. /**
  19. * Override cmCommand::InvokeInitialPass to get arguments before
  20. * expansion.
  21. */
  22. bool InvokeInitialPass(std::vector<cmListFileArgument> const& args,
  23. cmExecutionStatus& status) CM_OVERRIDE;
  24. /**
  25. * This is called when the command is first encountered in
  26. * the CMakeLists.txt file.
  27. */
  28. bool InitialPass(std::vector<std::string> const&,
  29. cmExecutionStatus&) CM_OVERRIDE
  30. {
  31. return false;
  32. }
  33. /**
  34. * This determines if the command is invoked when in script mode.
  35. */
  36. bool IsScriptable() const CM_OVERRIDE { return true; }
  37. /**
  38. * The name of the command as specified in CMakeList.txt.
  39. */
  40. std::string GetName() const CM_OVERRIDE { return "endwhile"; }
  41. cmTypeMacro(cmEndWhileCommand, cmCommand);
  42. };
  43. #endif