cmElseIfCommand.h 1.1 KB

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