cmRemoveDefinitionsCommand.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. /*============================================================================
  2. CMake - Cross Platform Makefile Generator
  3. Copyright 2000-2009 Kitware, Inc., Insight Software Consortium
  4. Distributed under the OSI-approved BSD License (the "License");
  5. see accompanying file Copyright.txt for details.
  6. This software is distributed WITHOUT ANY WARRANTY; without even the
  7. implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  8. See the License for more information.
  9. ============================================================================*/
  10. #ifndef cmRemoveDefinitionsCommand_h
  11. #define cmRemoveDefinitionsCommand_h
  12. #include "cmCommand.h"
  13. /** \class cmRemoveDefinitionsCommand
  14. * \brief Specify a list of compiler defines
  15. *
  16. * cmRemoveDefinitionsCommand specifies a list of compiler defines.
  17. * These defines will
  18. * be removed from the compile command.
  19. */
  20. class cmRemoveDefinitionsCommand : public cmCommand
  21. {
  22. public:
  23. /**
  24. * This is a virtual constructor for the command.
  25. */
  26. virtual cmCommand* Clone()
  27. {
  28. return new cmRemoveDefinitionsCommand;
  29. }
  30. /**
  31. * This is called when the command is first encountered in
  32. * the CMakeLists.txt file.
  33. */
  34. virtual bool InitialPass(std::vector<std::string> const& args,
  35. cmExecutionStatus &status);
  36. /**
  37. * The name of the command as specified in CMakeList.txt.
  38. */
  39. virtual const char* GetName() {return "remove_definitions";}
  40. /**
  41. * Succinct documentation.
  42. */
  43. virtual const char* GetTerseDocumentation()
  44. {
  45. return "Removes -D define flags added by add_definitions.";
  46. }
  47. /**
  48. * More documentation.
  49. */
  50. virtual const char* GetFullDocumentation()
  51. {
  52. return
  53. " remove_definitions(-DFOO -DBAR ...)\n"
  54. "Removes flags (added by add_definitions) from the compiler command "
  55. "line for sources in the current directory and below.";
  56. }
  57. cmTypeMacro(cmRemoveDefinitionsCommand, cmCommand);
  58. };
  59. #endif