cmSubdirCommand.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  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 cmSubdirCommand_h
  12. #define cmSubdirCommand_h
  13. #include "cmStandardIncludes.h"
  14. #include "cmCommand.h"
  15. /** \class cmSubdirCommand
  16. * \brief Specify a list of subdirectories to build.
  17. *
  18. * cmSubdirCommand 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 cmSubdirCommand : public cmCommand
  23. {
  24. public:
  25. /**
  26. * This is a virtual constructor for the command.
  27. */
  28. virtual cmCommand* Clone()
  29. {
  30. return new cmSubdirCommand;
  31. }
  32. /**
  33. * This is called when the command is first encountered in
  34. * the CMakeLists.txt file.
  35. */
  36. virtual bool Invoke(std::vector<std::string>& args);
  37. /**
  38. * The name of the command as specified in CMakeList.txt.
  39. */
  40. virtual const char* GetName() { return "SUBDIRS";}
  41. /**
  42. * Succinct documentation.
  43. */
  44. virtual const char* GetTerseDocumentation()
  45. {
  46. return "Add a list of subdirectories to the build.";
  47. }
  48. /**
  49. * More documentation.
  50. */
  51. virtual const char* GetFullDocumentation()
  52. {
  53. return
  54. "SUBDIRS(dir1 dir2 ...)\n"
  55. "Add a list of subdirectories to the build.\n"
  56. "This will cause any CMakeLists.txt files in the sub directories\n"
  57. "to be processed by CMake.";
  58. }
  59. cmTypeMacro(cmSubdirCommand, cmCommand);
  60. };
  61. #endif