cmSourceFilesCommand.h 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. /*=========================================================================
  2. Program: Insight Segmentation & Registration Toolkit
  3. Module: $RCSfile$
  4. Language: C++
  5. Date: $Date$
  6. Version: $Revision$
  7. Copyright (c) 2002 Insight Consortium. All rights reserved.
  8. See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm 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 cmSourceFilesCommand_h
  14. #define cmSourceFilesCommand_h
  15. #include "cmStandardIncludes.h"
  16. #include "cmCommand.h"
  17. /** \class cmSourceFilesCommand
  18. * \brief Add source files to the build.
  19. *
  20. * cmSourceFilesCommand adds source files to the build. The source
  21. * files will be added to the current library (if defined by the
  22. * LIBRARY(library) command. Use this command to add source files not
  23. * dependent on other packages (use SOURCE_FILES_REQUIRED() to add
  24. * dependent source files).
  25. *
  26. * It allows sources to be added even if they are generated by a build
  27. * process. This can be achieved usiong GENERATED keyword:
  28. * SOURCE_FILES( Project_SRCS
  29. * Source1
  30. * Source2
  31. * ...
  32. * GENERATED
  33. * SourceThatDoesNotExist )
  34. *
  35. * \sa cmSourceFilesRequireCommand
  36. */
  37. class cmSourceFilesCommand : public cmCommand
  38. {
  39. public:
  40. /**
  41. * This is a virtual constructor for the command.
  42. */
  43. virtual cmCommand* Clone()
  44. {
  45. return new cmSourceFilesCommand;
  46. }
  47. /**
  48. * This is called when the command is first encountered in
  49. * the CMakeLists.txt file.
  50. */
  51. virtual bool InitialPass(std::vector<std::string> const& args);
  52. /**
  53. * The name of the command as specified in CMakeList.txt.
  54. */
  55. virtual const char* GetName() { return "SOURCE_FILES";}
  56. /**
  57. * Succinct documentation.
  58. */
  59. virtual const char* GetTerseDocumentation()
  60. {
  61. return "Add a list of source files, associate them with a NAME.";
  62. }
  63. /**
  64. * More documentation.
  65. */
  66. virtual const char* GetFullDocumentation()
  67. {
  68. return
  69. "SOURCE_FILES(NAME file1 file2 ... [ GENERATED generated_file1 ... ])";
  70. }
  71. cmTypeMacro(cmSourceFilesCommand, cmCommand);
  72. };
  73. #endif