cmWin32DefinesCommand.h 1.9 KB

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