cmExportLibraryDependencies.h 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  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 cmExportLibraryDependenciesCommand_h
  14. #define cmExportLibraryDependenciesCommand_h
  15. #include "cmCommand.h"
  16. /** \class cmExportLibraryDependenciesCommand
  17. * \brief Add a test to the lists of tests to run.
  18. *
  19. * cmExportLibraryDependenciesCommand adds a test to the list of tests to run .
  20. */
  21. class cmExportLibraryDependenciesCommand : public cmCommand
  22. {
  23. public:
  24. /**
  25. * This is a virtual constructor for the command.
  26. */
  27. virtual cmCommand* Clone()
  28. {
  29. return new cmExportLibraryDependenciesCommand;
  30. }
  31. /**
  32. * This is called when the command is first encountered in
  33. * the CMakeLists.txt file.
  34. */
  35. virtual bool InitialPass(std::vector<std::string> const& args);
  36. /**
  37. * This is called at the end after all the information
  38. * specified by the command is accumulated.
  39. */
  40. virtual void FinalPass();
  41. /**
  42. * The name of the command as specified in CMakeList.txt.
  43. */
  44. virtual const char* GetName() { return "EXPORT_LIBRARY_DEPENDENCIES";}
  45. /**
  46. * Succinct documentation.
  47. */
  48. virtual const char* GetTerseDocumentation()
  49. {
  50. return "Write out the dependency information for all targets of a project.";
  51. }
  52. /**
  53. * More documentation.
  54. */
  55. virtual const char* GetFullDocumentation()
  56. {
  57. return
  58. " EXPORT_LIBRARY_DEPENDENCIES(FILE [APPEND])\n"
  59. "Create a file that can be included into a CMake listfile with the "
  60. "INCLUDE command. The file will contain a number of SET commands "
  61. "that will set all the variables needed for library dependency "
  62. "information. This should be the last command in the top level "
  63. "CMakeLists.txt file of the project. If the APPEND option is "
  64. "specified, the SET commands will be appended to the given file "
  65. "instead of replacing it.";
  66. }
  67. cmTypeMacro(cmExportLibraryDependenciesCommand, cmCommand);
  68. private:
  69. std::vector<std::string> m_Args;
  70. };
  71. #endif