cmFindIncludeCommand.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  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 cmFindIncludeCommand_h
  12. #define cmFindIncludeCommand_h
  13. #include "cmStandardIncludes.h"
  14. #include "cmCommand.h"
  15. /** \class cmFindIncludeCommand
  16. * \brief Define a command that searches for an include file.
  17. *
  18. * cmFindIncludeCommand is used to define a CMake variable include
  19. * path location by specifying a file and list of directories.
  20. */
  21. class cmFindIncludeCommand : public cmCommand
  22. {
  23. public:
  24. /**
  25. * This is a virtual constructor for the command.
  26. */
  27. virtual cmCommand* Clone()
  28. {
  29. return new cmFindIncludeCommand;
  30. }
  31. /**
  32. * This is called when the command is first encountered in
  33. * the CMakeLists.txt file.
  34. */
  35. virtual bool Invoke(std::vector<std::string>& args);
  36. /**
  37. * This determines if the command gets propagated down
  38. * to makefiles located in subdirectories.
  39. */
  40. virtual bool IsInherited()
  41. {return true;}
  42. /**
  43. * The name of the command as specified in CMakeList.txt.
  44. */
  45. virtual const char* GetName() { return "FIND_INCLUDE";}
  46. /**
  47. * Succinct documentation.
  48. */
  49. virtual const char* GetTerseDocumentation()
  50. {
  51. return "Find an include path.";
  52. }
  53. /**
  54. * More documentation.
  55. */
  56. virtual const char* GetFullDocumentation()
  57. {
  58. return
  59. "FIND_INCLUDE(DEFINE try1 try2 ...)";
  60. }
  61. cmTypeMacro(cmFindIncludeCommand, cmCommand);
  62. };
  63. #endif