cmIncludeCommand.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  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 cmIncludeCommand_h
  12. #define cmIncludeCommand_h
  13. #include "cmStandardIncludes.h"
  14. #include "cmCommand.h"
  15. /** \class cmIncludeCommand
  16. * \brief
  17. *
  18. * cmIncludeCommand defines a list of distant
  19. * files that can be "included" in the current list file.
  20. * In almost every sense, this is identical to a C/C++
  21. * #include command. Arguments are first expended as usual.
  22. */
  23. class cmIncludeCommand : public cmCommand
  24. {
  25. public:
  26. /**
  27. * This is a virtual constructor for the command.
  28. */
  29. virtual cmCommand* Clone()
  30. {
  31. return new cmIncludeCommand;
  32. }
  33. /**
  34. * This is called when the command is first encountered in
  35. * the CMakeLists.txt file.
  36. */
  37. virtual bool InitialPass(std::vector<std::string> const& args);
  38. /**
  39. * This determines if the command gets propagated down
  40. * to makefiles located in subdirectories.
  41. */
  42. virtual bool IsInherited() {return true;}
  43. /**
  44. * The name of the command as specified in CMakeList.txt.
  45. */
  46. virtual const char* GetName() {return "INCLUDE";}
  47. /**
  48. * Succinct documentation.
  49. */
  50. virtual const char* GetTerseDocumentation()
  51. {
  52. return "Basically identical to a C #include \"somthing\" command.";
  53. }
  54. /**
  55. * More documentation.
  56. */
  57. virtual const char* GetFullDocumentation()
  58. {
  59. return
  60. "INCLUDE(file1 [OPTIONAL])\nIf OPTIONAL is present, then do not complain "
  61. "if the file does not exist.";
  62. }
  63. cmTypeMacro(cmIncludeCommand, cmCommand);
  64. };
  65. #endif