cmFindIncludeRule.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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 cmFindIncludeRule_h
  12. #define cmFindIncludeRule_h
  13. #include "cmStandardIncludes.h"
  14. #include "cmRuleMaker.h"
  15. /** \class cmFindIncludeRule
  16. * \brief Define a rule that searches for an include file.
  17. *
  18. * cmFindIncludeRule is used to define a CMake variable include
  19. * path location by specifying a file and list of directories.
  20. */
  21. class cmFindIncludeRule : public cmRuleMaker
  22. {
  23. public:
  24. /**
  25. * This is a virtual constructor for the rule.
  26. */
  27. virtual cmRuleMaker* Clone()
  28. {
  29. return new cmFindIncludeRule;
  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()
  46. {return true;}
  47. /**
  48. * The name of the rule as specified in CMakeList.txt.
  49. */
  50. virtual const char* GetName() { return "FIND_INCLUDE";}
  51. /**
  52. * Succinct documentation.
  53. */
  54. virtual const char* TerseDocumentation()
  55. {
  56. return "Find an include path.";
  57. }
  58. /**
  59. * More documentation.
  60. */
  61. virtual const char* FullDocumentation()
  62. {
  63. return
  64. "FIND_INCLUDE(DEFINE try1 try2 ...)";
  65. }
  66. };
  67. #endif