cmTestsRule.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. /*=========================================================================
  2. Program: Insight Segmentation & Registration Toolkit
  3. Module: $RCSfile$
  4. Language: C++
  5. Date: $Date$
  6. Version: $Revision$
  7. Copyright (c) 2000 National Library of Medicine
  8. All rights reserved.
  9. See COPYRIGHT.txt for copyright details.
  10. =========================================================================*/
  11. #ifndef cmTestsRule_h
  12. #define cmTestsRule_h
  13. #include "cmStandardIncludes.h"
  14. #include "cmRuleMaker.h"
  15. /** \class cmTestsRule
  16. * \brief Specify a list of executables to build and which are
  17. * identified as tests.
  18. *
  19. * cmTestsRule specifies a list of executables to be built by CMake.
  20. * These executables are identified as tests. This rule is similar to
  21. * the EXECUTABLES() rule.
  22. *
  23. * \sa cmExecutablesRule
  24. */
  25. class cmTestsRule : public cmRuleMaker
  26. {
  27. public:
  28. /**
  29. * This is a virtual constructor for the rule.
  30. */
  31. virtual cmRuleMaker* Clone()
  32. {
  33. return new cmTestsRule;
  34. }
  35. /**
  36. * This is called when the rule is first encountered in
  37. * the CMakeLists.txt file.
  38. */
  39. virtual bool Invoke(std::vector<std::string>& args);
  40. /**
  41. * This is called at the end after all the information
  42. * specified by the rules is accumulated.
  43. */
  44. virtual void FinalPass() { }
  45. /**
  46. * The name of the rule as specified in CMakeList.txt.
  47. */
  48. virtual const char* GetName() {return "TESTS";}
  49. /**
  50. * Succinct documentation.
  51. */
  52. virtual const char* TerseDocumentation()
  53. {
  54. return "Add a list of executables files that are run as tests.";
  55. }
  56. /**
  57. * More documentation.
  58. */
  59. virtual const char* FullDocumentation()
  60. {
  61. return
  62. "TESTS(file1 file2 ...)";
  63. }
  64. };
  65. #endif