cmCTestBuildCommand.h 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. /*============================================================================
  2. CMake - Cross Platform Makefile Generator
  3. Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
  4. Distributed under the OSI-approved BSD License (the "License");
  5. see accompanying file Copyright.txt for details.
  6. This software is distributed WITHOUT ANY WARRANTY; without even the
  7. implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  8. See the License for more information.
  9. ============================================================================*/
  10. #ifndef cmCTestBuildCommand_h
  11. #define cmCTestBuildCommand_h
  12. #include <cmConfigure.h>
  13. #include "cmCTestHandlerCommand.h"
  14. #include "cmTypeMacro.h"
  15. #include <string>
  16. #include <vector>
  17. class cmCTestBuildHandler;
  18. class cmCTestGenericHandler;
  19. class cmCommand;
  20. class cmExecutionStatus;
  21. class cmGlobalGenerator;
  22. /** \class cmCTestBuild
  23. * \brief Run a ctest script
  24. *
  25. * cmCTestBuildCommand defineds the command to build the project.
  26. */
  27. class cmCTestBuildCommand : public cmCTestHandlerCommand
  28. {
  29. public:
  30. cmCTestBuildCommand();
  31. ~cmCTestBuildCommand() CM_OVERRIDE;
  32. /**
  33. * This is a virtual constructor for the command.
  34. */
  35. cmCommand* Clone() CM_OVERRIDE
  36. {
  37. cmCTestBuildCommand* ni = new cmCTestBuildCommand;
  38. ni->CTest = this->CTest;
  39. ni->CTestScriptHandler = this->CTestScriptHandler;
  40. return ni;
  41. }
  42. /**
  43. * The name of the command as specified in CMakeList.txt.
  44. */
  45. std::string GetName() const CM_OVERRIDE { return "ctest_build"; }
  46. bool InitialPass(std::vector<std::string> const& args,
  47. cmExecutionStatus& status) CM_OVERRIDE;
  48. cmTypeMacro(cmCTestBuildCommand, cmCTestHandlerCommand);
  49. cmGlobalGenerator* GlobalGenerator;
  50. protected:
  51. cmCTestBuildHandler* Handler;
  52. enum
  53. {
  54. ctb_BUILD = ct_LAST,
  55. ctb_NUMBER_ERRORS,
  56. ctb_NUMBER_WARNINGS,
  57. ctb_TARGET,
  58. ctb_CONFIGURATION,
  59. ctb_FLAGS,
  60. ctb_PROJECT_NAME,
  61. ctb_LAST
  62. };
  63. cmCTestGenericHandler* InitializeHandler() CM_OVERRIDE;
  64. };
  65. #endif