You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

89 lines
2.6 KiB

23 years ago
  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 cmLinkLibrariesCommand_h
  14. #define cmLinkLibrariesCommand_h
  15. #include "cmCommand.h"
  16. /** \class cmLinkLibrariesCommand
  17. * \brief Specify a list of libraries to link into executables.
  18. *
  19. * cmLinkLibrariesCommand is used to specify a list of libraries to link
  20. * into executable(s) or shared objects. The names of the libraries
  21. * should be those defined by the LIBRARY(library) command(s).
  22. */
  23. class cmLinkLibrariesCommand : public cmCommand
  24. {
  25. public:
  26. /**
  27. * This is a virtual constructor for the command.
  28. */
  29. virtual cmCommand* Clone()
  30. {
  31. return new cmLinkLibrariesCommand;
  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 "LINK_LIBRARIES";}
  47. /**
  48. * Succinct documentation.
  49. */
  50. virtual const char* GetTerseDocumentation()
  51. {
  52. return "Link libraries to all targets added later.";
  53. }
  54. /**
  55. * More documentation.
  56. */
  57. virtual const char* GetFullDocumentation()
  58. {
  59. return
  60. " LINK_LIBRARIES(library1 <debug | optimized> library2 ...)\n"
  61. "This is an old CMake command for linking libraries. Use "
  62. "TARGET_LINK_LIBRARIES unless you have a good reason for every target "
  63. "to link to the same set of libraries.\n"
  64. "Specify a list of libraries to be linked into "
  65. "any following targets (typically added with the ADD_EXECUTABLE "
  66. "or ADD_LIBRARY calls). This command is passed "
  67. "down to all subdirectories. "
  68. "The debug and optimized strings may be used to indicate that "
  69. "the next library listed is to be used only for that specific "
  70. "type of build.";
  71. }
  72. cmTypeMacro(cmLinkLibrariesCommand, cmCommand);
  73. };
  74. #endif