cmCTestConfigureCommand.h 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  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 cmCTestConfigureCommand_h
  11. #define cmCTestConfigureCommand_h
  12. #include "cmCTestHandlerCommand.h"
  13. /** \class cmCTestConfigure
  14. * \brief Run a ctest script
  15. *
  16. * cmCTestConfigureCommand defineds the command to configures the project.
  17. */
  18. class cmCTestConfigureCommand : public cmCTestHandlerCommand
  19. {
  20. public:
  21. cmCTestConfigureCommand();
  22. /**
  23. * This is a virtual constructor for the command.
  24. */
  25. virtual cmCommand* Clone()
  26. {
  27. cmCTestConfigureCommand* ni = new cmCTestConfigureCommand;
  28. ni->CTest = this->CTest;
  29. ni->CTestScriptHandler = this->CTestScriptHandler;
  30. return ni;
  31. }
  32. /**
  33. * The name of the command as specified in CMakeList.txt.
  34. */
  35. virtual const char* GetName() { return "ctest_configure";}
  36. /**
  37. * Succinct documentation.
  38. */
  39. virtual const char* GetTerseDocumentation()
  40. {
  41. return "Configure the project build tree.";
  42. }
  43. /**
  44. * More documentation.
  45. */
  46. virtual const char* GetFullDocumentation()
  47. {
  48. return
  49. " ctest_configure([BUILD build_dir] [SOURCE source_dir] [APPEND]\n"
  50. " [OPTIONS options] [RETURN_VALUE res])\n"
  51. "Configures the given build directory and stores results in "
  52. "Configure.xml. "
  53. "If no BUILD is given, the CTEST_BINARY_DIRECTORY variable is used. "
  54. "If no SOURCE is given, the CTEST_SOURCE_DIRECTORY variable is used. "
  55. "The OPTIONS argument specifies command line arguments to pass to "
  56. "the configuration tool. "
  57. "The RETURN_VALUE option specifies a variable in which to store the "
  58. "return value of the native build tool."
  59. "\n"
  60. CTEST_COMMAND_APPEND_OPTION_DOCS;
  61. }
  62. cmTypeMacro(cmCTestConfigureCommand, cmCTestHandlerCommand);
  63. protected:
  64. cmCTestGenericHandler* InitializeHandler();
  65. enum {
  66. ctc_FIRST = ct_LAST,
  67. ctc_OPTIONS,
  68. ctc_LAST
  69. };
  70. };
  71. #endif