cmCustomCommand.h 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. /*=========================================================================
  2. Program: CMake - Cross-Platform Makefile Generator
  3. Module: $RCSfile$
  4. Language: C++
  5. Date: $Date$
  6. Version: $Revision$
  7. Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
  8. See Copyright.txt or http://www.cmake.org/HTML/Copyright.html 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 cmCustomCommand_h
  14. #define cmCustomCommand_h
  15. #include "cmStandardIncludes.h"
  16. /** \class cmCustomCommand
  17. * \brief A class to encapsulate a custom command
  18. *
  19. * cmCustomCommand encapsulates the properties of a custom command
  20. */
  21. class cmCustomCommand
  22. {
  23. public:
  24. /** Default and copy constructors for STL containers. */
  25. cmCustomCommand();
  26. cmCustomCommand(const cmCustomCommand& r);
  27. /** Main constructor specifies all information for the command. */
  28. cmCustomCommand(const std::vector<std::string>& outputs,
  29. const std::vector<std::string>& depends,
  30. const cmCustomCommandLines& commandLines,
  31. const char* comment,
  32. const char* workingDirectory);
  33. /** Get the output file produced by the command. */
  34. const std::vector<std::string>& GetOutputs() const;
  35. /** Get the working directory. */
  36. const char* GetWorkingDirectory() const;
  37. /** Get the vector that holds the list of dependencies. */
  38. const std::vector<std::string>& GetDepends() const;
  39. /** Get the list of command lines. */
  40. const cmCustomCommandLines& GetCommandLines() const;
  41. /** Get the comment string for the command. */
  42. const char* GetComment() const;
  43. /** set get the used status of the command */
  44. void SetUsed() { this->Used = true;};
  45. bool IsUsed() { return this->Used;};
  46. private:
  47. std::vector<std::string> Outputs;
  48. std::vector<std::string> Depends;
  49. cmCustomCommandLines CommandLines;
  50. std::string Comment;
  51. std::string WorkingDirectory;
  52. bool Used;
  53. };
  54. #endif