cmEndWhileCommand.h 1.3 KB

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