cmUnixLibrariesRule.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  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 cmUnixLibrariesRule_h
  12. #define cmUnixLibrariesRule_h
  13. #include "cmStandardIncludes.h"
  14. #include "cmRuleMaker.h"
  15. /** \class cmUnixLibrariesRule
  16. * \brief Specify a list of libraries for Unix platforms.
  17. *
  18. * cmUnixLibrariesRule specifies a list of libraries for Unix platforms
  19. * only. Both user and system libraries can be listed.
  20. */
  21. class cmUnixLibrariesRule : public cmRuleMaker
  22. {
  23. public:
  24. /**
  25. * Constructor.
  26. */
  27. cmUnixLibrariesRule();
  28. /**
  29. * This is a virtual constructor for the rule.
  30. */
  31. virtual cmRuleMaker* Clone()
  32. {
  33. return new cmUnixLibrariesRule;
  34. }
  35. /**
  36. * This is called when the rule is first encountered in
  37. * the CMakeLists.txt file.
  38. */
  39. virtual bool Invoke(std::vector<std::string>& args);
  40. /**
  41. * This is called at the end after all the information
  42. * specified by the rules is accumulated.
  43. */
  44. virtual void FinalPass() { }
  45. /**
  46. * This determines if the rule gets propagated down
  47. * to makefiles located in subdirectories.
  48. */
  49. virtual bool IsInherited() {return true;}
  50. /**
  51. * The name of the rule as specified in CMakeList.txt.
  52. */
  53. virtual const char* GetName() {return "UNIX_LIBRARIES";}
  54. /**
  55. * Succinct documentation.
  56. */
  57. virtual const char* TerseDocumentation()
  58. {
  59. return "Add libraries that are only used for Unix programs.";
  60. }
  61. /**
  62. * More documentation.
  63. */
  64. virtual const char* FullDocumentation()
  65. {
  66. return
  67. "UNIX_LIBRARIES(library -lm ...)";
  68. }
  69. };
  70. #endif