cmSourceFilesRule.h 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  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 cmSourceFilesRule_h
  12. #define cmSourceFilesRule_h
  13. #include "cmStandardIncludes.h"
  14. #include "cmRuleMaker.h"
  15. /** \class cmSourceFilesRule
  16. * \brief Add source files to the build.
  17. *
  18. * cmSourceFilesRule adds source files to the build. The source
  19. * files will be added to the current library (if defined by the
  20. * LIBRARY(library) rule. Use this rule to add source files not
  21. * dependent on other packages (use SOURCE_FILES_REQUIRED() to add
  22. * dependent source files).
  23. *
  24. * \sa cmSourceFilesRequireRule
  25. */
  26. class cmSourceFilesRule : public cmRuleMaker
  27. {
  28. public:
  29. /**
  30. * This is a virtual constructor for the rule.
  31. */
  32. virtual cmRuleMaker* Clone()
  33. {
  34. return new cmSourceFilesRule;
  35. }
  36. /**
  37. * This is called when the rule is first encountered in
  38. * the CMakeLists.txt file.
  39. */
  40. virtual bool Invoke(std::vector<std::string>& args);
  41. /**
  42. * This is called at the end after all the information
  43. * specified by the rules is accumulated.
  44. */
  45. virtual void FinalPass() { }
  46. /**
  47. * The name of the rule as specified in CMakeList.txt.
  48. */
  49. virtual const char* GetName() { return "SOURCE_FILES";}
  50. /**
  51. * Succinct documentation.
  52. */
  53. virtual const char* TerseDocumentation()
  54. {
  55. return "Add a list of source files.";
  56. }
  57. /**
  58. * More documentation.
  59. */
  60. virtual const char* FullDocumentation()
  61. {
  62. return
  63. "SOURCE_FILES(file1 file2 ...)";
  64. }
  65. };
  66. #endif