cmLoadCacheCommand.h 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  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 cmLoadCacheCommand_h
  14. #define cmLoadCacheCommand_h
  15. /** \class cmLoadCacheCommand
  16. * \brief load a cache file
  17. *
  18. * cmLoadCacheCommand loads the non internal values of a cache file
  19. */
  20. class cmLoadCacheCommand : public cmCommand
  21. {
  22. public:
  23. /**
  24. * This is a virtual constructor for the command.
  25. */
  26. virtual cmCommand* Clone()
  27. {
  28. return new cmLoadCacheCommand;
  29. }
  30. /**
  31. * This is called when the command is first encountered in
  32. * the CMakeLists.txt file.
  33. */
  34. virtual bool InitialPass(std::vector<std::string> const& args);
  35. /**
  36. * This determines if the command gets propagated down
  37. * to makefiles located in subdirectories.
  38. */
  39. virtual bool IsInherited() {return true;}
  40. /**
  41. * The name of the command as specified in CMakeList.txt.
  42. */
  43. virtual const char* GetName() { return "LOAD_CACHE";}
  44. /**
  45. * Succinct documentation.
  46. */
  47. virtual const char* GetTerseDocumentation()
  48. {
  49. return "load in the values from another cache.";
  50. }
  51. /**
  52. * More documentation.
  53. */
  54. virtual const char* GetFullDocumentation()
  55. {
  56. return
  57. "LOAD_CACHE(pathToCacheFile [EXCLUDE entry1...] [INCLUDE_INTERNALS entry1...])\n"
  58. "Load in the values from another cache. This is useful for a project "
  59. "that depends on another project built in a different tree."
  60. "EXCLUDE option can be used to provide a list of entries to be excluded."
  61. "INCLUDE_INTERNALS can be used to provide a list of internal entries"
  62. "to be included. Normally, no internal entries are brougt in.";
  63. }
  64. cmTypeMacro(cmLoadCacheCommand, cmCommand);
  65. };
  66. #endif