cmCTestBuildCommand.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  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 cmCTestBuildCommand_h
  4. #define cmCTestBuildCommand_h
  5. #include "cmConfigure.h" // IWYU pragma: keep
  6. #include "cmCTestHandlerCommand.h"
  7. #include <string>
  8. #include <vector>
  9. class cmCTestBuildHandler;
  10. class cmCTestGenericHandler;
  11. class cmCommand;
  12. class cmExecutionStatus;
  13. class cmGlobalGenerator;
  14. /** \class cmCTestBuild
  15. * \brief Run a ctest script
  16. *
  17. * cmCTestBuildCommand defineds the command to build the project.
  18. */
  19. class cmCTestBuildCommand : public cmCTestHandlerCommand
  20. {
  21. public:
  22. cmCTestBuildCommand();
  23. ~cmCTestBuildCommand() override;
  24. /**
  25. * This is a virtual constructor for the command.
  26. */
  27. cmCommand* Clone() override
  28. {
  29. cmCTestBuildCommand* ni = new cmCTestBuildCommand;
  30. ni->CTest = this->CTest;
  31. ni->CTestScriptHandler = this->CTestScriptHandler;
  32. return ni;
  33. }
  34. /**
  35. * The name of the command as specified in CMakeList.txt.
  36. */
  37. std::string GetName() const override { return "ctest_build"; }
  38. bool InitialPass(std::vector<std::string> const& args,
  39. cmExecutionStatus& status) override;
  40. cmGlobalGenerator* GlobalGenerator;
  41. protected:
  42. cmCTestBuildHandler* Handler;
  43. enum
  44. {
  45. ctb_BUILD = ct_LAST,
  46. ctb_NUMBER_ERRORS,
  47. ctb_NUMBER_WARNINGS,
  48. ctb_TARGET,
  49. ctb_CONFIGURATION,
  50. ctb_FLAGS,
  51. ctb_PROJECT_NAME,
  52. ctb_LAST
  53. };
  54. cmCTestGenericHandler* InitializeHandler() override;
  55. };
  56. #endif