cmIncludeDirectoryRule.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  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 cmIncludeDirectoryRule_h
  12. #define cmIncludeDirectoryRule_h
  13. #include "cmStandardIncludes.h"
  14. #include "cmRuleMaker.h"
  15. /** \class cmIncludeDirectoryRule
  16. * \brief Add include directories to the build.
  17. *
  18. * cmIncludeDirectoryRule is used to specify directory locations
  19. * to search for included files.
  20. */
  21. class cmIncludeDirectoryRule : public cmRuleMaker
  22. {
  23. public:
  24. /**
  25. * This is a virtual constructor for the rule.
  26. */
  27. virtual cmRuleMaker* Clone()
  28. {
  29. return new cmIncludeDirectoryRule;
  30. }
  31. /**
  32. * This is called when the rule is first encountered in
  33. * the CMakeLists.txt file.
  34. */
  35. virtual bool Invoke(std::vector<std::string>& args);
  36. /**
  37. * This is called at the end after all the information
  38. * specified by the rules is accumulated.
  39. */
  40. virtual void FinalPass() { }
  41. /**
  42. * This determines if the rule gets propagated down
  43. * to makefiles located in subdirectories.
  44. */
  45. virtual bool IsInherited() {return true;}
  46. /**
  47. * The name of the rule as specified in CMakeList.txt.
  48. */
  49. virtual const char* GetName() { return "INCLUDE_DIRECTORIES";}
  50. /**
  51. * Succinct documentation.
  52. */
  53. virtual const char* TerseDocumentation()
  54. {
  55. return "Add include directories to the build.";
  56. }
  57. /**
  58. * More documentation.
  59. */
  60. virtual const char* FullDocumentation()
  61. {
  62. return
  63. "INCLUDE_DIRECTORIES(dir1 dir2 ...).\n";
  64. }
  65. };
  66. #endif