cmSubdirRule.h 1.8 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 cmSubdirRule_h
  12. #define cmSubdirRule_h
  13. #include "cmStandardIncludes.h"
  14. #include "cmRuleMaker.h"
  15. /** \class cmSubdirRule
  16. * \brief Specify a list of subdirectories to build.
  17. *
  18. * cmSubdirRule specifies a list of subdirectories to process
  19. * by CMake. For each subdirectory listed, CMake will descend
  20. * into that subdirectory and process any CMakeLists.txt found.
  21. */
  22. class cmSubdirRule : public cmRuleMaker
  23. {
  24. public:
  25. /**
  26. * This is a virtual constructor for the rule.
  27. */
  28. virtual cmRuleMaker* Clone()
  29. {
  30. return new cmSubdirRule;
  31. }
  32. /**
  33. * This is called when the rule is first encountered in
  34. * the CMakeLists.txt file.
  35. */
  36. virtual bool Invoke(std::vector<std::string>& args);
  37. /**
  38. * This is called at the end after all the information
  39. * specified by the rules is accumulated.
  40. */
  41. virtual void FinalPass() { }
  42. /**
  43. * The name of the rule as specified in CMakeList.txt.
  44. */
  45. virtual const char* GetName() { return "SUBDIRS";}
  46. /**
  47. * Succinct documentation.
  48. */
  49. virtual const char* TerseDocumentation()
  50. {
  51. return "Add a list of subdirectories to the build.";
  52. }
  53. /**
  54. * More documentation.
  55. */
  56. virtual const char* FullDocumentation()
  57. {
  58. return
  59. "Add a list of subdirectories to the build.\n"
  60. "SUBDIRS(dir1 dir2 ...)\n"
  61. "This will cause any CMakeLists.txt files in the sub directories\n"
  62. "to be processed by CMake.";
  63. }
  64. };
  65. #endif