cmIncludeDirectoryCommand.h 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. /*=========================================================================
  2. Program: CMake - Cross-Platform Makefile Generator
  3. Module: $RCSfile$
  4. Language: C++
  5. Date: $Date$
  6. Version: $Revision$
  7. Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
  8. See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
  9. This software is distributed WITHOUT ANY WARRANTY; without even
  10. the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
  11. PURPOSE. See the above copyright notices for more information.
  12. =========================================================================*/
  13. #ifndef cmIncludeDirectoryCommand_h
  14. #define cmIncludeDirectoryCommand_h
  15. #include "cmStandardIncludes.h"
  16. #include "cmCommand.h"
  17. /** \class cmIncludeDirectoryCommand
  18. * \brief Add include directories to the build.
  19. *
  20. * cmIncludeDirectoryCommand is used to specify directory locations
  21. * to search for included files.
  22. */
  23. class cmIncludeDirectoryCommand : public cmCommand
  24. {
  25. public:
  26. /**
  27. * This is a virtual constructor for the command.
  28. */
  29. virtual cmCommand* Clone()
  30. {
  31. return new cmIncludeDirectoryCommand;
  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_DIRECTORIES";}
  47. /**
  48. * Succinct documentation.
  49. */
  50. virtual const char* GetTerseDocumentation()
  51. {
  52. return "Add include directories to the build.";
  53. }
  54. /**
  55. * More documentation.
  56. */
  57. virtual const char* GetFullDocumentation()
  58. {
  59. return
  60. " INCLUDE_DIRECTORIES([BEFORE] dir1 dir2 ...)\n"
  61. "Add the given directories to those searched by the compiler for "
  62. "include files. If BEFORE is specified, the directories are prepended "
  63. "onto the current list of directories instead of appended.";
  64. }
  65. cmTypeMacro(cmIncludeDirectoryCommand, cmCommand);
  66. };
  67. #endif