1
0

cmAddDefinitionsCommand.h 2.1 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 cmAddDefinitionsCommand_h
  14. #define cmAddDefinitionsCommand_h
  15. #include "cmStandardIncludes.h"
  16. #include "cmCommand.h"
  17. /** \class cmAddDefinitionsCommand
  18. * \brief Specify a list of compiler defines
  19. *
  20. * cmAddDefinitionsCommand specifies a list of compiler defines. These defines will
  21. * be added to the compile command.
  22. */
  23. class cmAddDefinitionsCommand : public cmCommand
  24. {
  25. public:
  26. /**
  27. * This is a virtual constructor for the command.
  28. */
  29. virtual cmCommand* Clone()
  30. {
  31. return new cmAddDefinitionsCommand;
  32. }
  33. /**
  34. * This is called when the command is first encountered in
  35. * the CMakeLists.txt file.
  36. */
  37. virtual bool InitialPass(std::vector<std::string> const& args);
  38. /**
  39. * This determines if the command gets propagated down
  40. * to makefiles located in subdirectories.
  41. */
  42. virtual bool IsInherited() {return true;}
  43. /**
  44. * The name of the command as specified in CMakeList.txt.
  45. */
  46. virtual const char* GetName() {return "ADD_DEFINITIONS";}
  47. /**
  48. * Succinct documentation.
  49. */
  50. virtual const char* GetTerseDocumentation()
  51. {
  52. return "Add -D define flags to command line for environments.";
  53. }
  54. /**
  55. * More documentation.
  56. */
  57. virtual const char* GetFullDocumentation()
  58. {
  59. return
  60. "ADD_DEFINITIONS(-DFOO -DBAR ...)\n"
  61. "Add -D define flags to command line for environments.";
  62. }
  63. cmTypeMacro(cmAddDefinitionsCommand, cmCommand);
  64. };
  65. #endif