cmSourceFilesRemoveCommand.h 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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 cmSourceFilesRemoveCommand_h
  14. #define cmSourceFilesRemoveCommand_h
  15. #include "cmStandardIncludes.h"
  16. #include "cmCommand.h"
  17. /** \class cmSourceFilesRemoveCommand
  18. * \brief Remove source files from the build.
  19. *
  20. * cmSourceFilesRemoveCommand removes source files from the build.
  21. * The sourcefiles will be removed from the current library (if defined by the
  22. * LIBRARY(library) command. This command is primarily designed to allow
  23. * customization of builds where (for example) a certain source file is
  24. * failing to compile and the user wishes to edit it out conditionally.
  25. *
  26. * \sa cmSourceFilesRequireCommand
  27. */
  28. class cmSourceFilesRemoveCommand : public cmCommand
  29. {
  30. public:
  31. /**
  32. * This is a virtual constructor for the command.
  33. */
  34. virtual cmCommand* Clone()
  35. {
  36. return new cmSourceFilesRemoveCommand;
  37. }
  38. /**
  39. * This is called when the command is first encountered in
  40. * the CMakeLists.txt file.
  41. */
  42. virtual bool InitialPass(std::vector<std::string> const& args);
  43. /**
  44. * The name of the command as specified in CMakeList.txt.
  45. */
  46. virtual const char* GetName() { return "SOURCE_FILES_REMOVE";}
  47. /**
  48. * Succinct documentation.
  49. */
  50. virtual const char* GetTerseDocumentation()
  51. {
  52. return "Remove a list of source files - associated with NAME.";
  53. }
  54. /**
  55. * Remove (conditionally if desired) a list of source files from a group.
  56. * This is most likely when the user has problems compiling certain files
  57. * in a library and wants to remove them (perhaps in an optional INCLUDE)
  58. */
  59. virtual const char* GetFullDocumentation()
  60. {
  61. return
  62. "SOURCE_FILES_REMOVE(NAME file1 file2 ...)";
  63. }
  64. cmTypeMacro(cmSourceFilesRemoveCommand, cmCommand);
  65. };
  66. #endif