cmCTestBuildCommand.h 1.8 KB

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