cmLinkLibrariesRule.h 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  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 cmLinkLibrariesRule_h
  12. #define cmLinkLibrariesRule_h
  13. #include "cmStandardIncludes.h"
  14. #include "cmRuleMaker.h"
  15. /** \class cmLinkLibrariesRule
  16. * \brief Specify a list of libraries to link into executables.
  17. *
  18. * cmLinkLibrariesRule is used to specify a list of libraries to link
  19. * into executable(s) or shared objects. The names of the libraries
  20. * should be those defined by the LIBRARY(library) rule(s).
  21. */
  22. class cmLinkLibrariesRule : public cmRuleMaker
  23. {
  24. public:
  25. /**
  26. * This is a virtual constructor for the rule.
  27. */
  28. virtual cmRuleMaker* Clone()
  29. {
  30. return new cmLinkLibrariesRule;
  31. }
  32. /**
  33. * This is called when the rule is first encountered in
  34. * the CMakeLists.txt file.
  35. */
  36. virtual bool Invoke(std::vector<std::string>& args);
  37. /**
  38. * This is called at the end after all the information
  39. * specified by the rules is accumulated.
  40. */
  41. virtual void FinalPass() { }
  42. /**
  43. * This determines if the rule gets propagated down
  44. * to makefiles located in subdirectories.
  45. */
  46. virtual bool IsInherited() {return true;}
  47. /**
  48. * The name of the rule as specified in CMakeList.txt.
  49. */
  50. virtual const char* GetName() { return "LINK_LIBRARIES";}
  51. /**
  52. * Succinct documentation.
  53. */
  54. virtual const char* TerseDocumentation()
  55. {
  56. return
  57. "Specify a list of libraries to be linked into executables or \n"
  58. "shared objects.";
  59. }
  60. /**
  61. * More documentation.
  62. */
  63. virtual const char* FullDocumentation()
  64. {
  65. return
  66. "Specify a list of libraries to be linked into executables or \n"
  67. "shared objects. This rule is passed down to all other rules."
  68. "LINK_LIBRARIES(library1 library2).\n"
  69. "The library name should be the same as the name used in the\n"
  70. "LIBRARY(library) rule.";
  71. }
  72. };
  73. #endif