cmCustomCommandGenerator.h 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
  2. file Copyright.txt or https://cmake.org/licensing for details. */
  3. #ifndef cmCustomCommandGenerator_h
  4. #define cmCustomCommandGenerator_h
  5. #include "cmConfigure.h" // IWYU pragma: keep
  6. #include "cmCustomCommandLines.h"
  7. #include <string>
  8. #include <vector>
  9. class cmCustomCommand;
  10. class cmGeneratorExpression;
  11. class cmLocalGenerator;
  12. class cmCustomCommandGenerator
  13. {
  14. cmCustomCommand const& CC;
  15. std::string Config;
  16. cmLocalGenerator* LG;
  17. bool OldStyle;
  18. bool MakeVars;
  19. cmGeneratorExpression* GE;
  20. cmCustomCommandLines CommandLines;
  21. std::vector<std::string> Depends;
  22. std::string WorkingDirectory;
  23. const char* GetCrossCompilingEmulator(unsigned int c) const;
  24. const char* GetArgv0Location(unsigned int c) const;
  25. public:
  26. cmCustomCommandGenerator(cmCustomCommand const& cc, std::string config,
  27. cmLocalGenerator* lg);
  28. ~cmCustomCommandGenerator();
  29. cmCustomCommand const& GetCC() const { return this->CC; }
  30. unsigned int GetNumberOfCommands() const;
  31. std::string GetCommand(unsigned int c) const;
  32. void AppendArguments(unsigned int c, std::string& cmd) const;
  33. const char* GetComment() const;
  34. std::string GetWorkingDirectory() const;
  35. std::vector<std::string> const& GetOutputs() const;
  36. std::vector<std::string> const& GetByproducts() const;
  37. std::vector<std::string> const& GetDepends() const;
  38. bool HasOnlyEmptyCommandLines() const;
  39. };
  40. #endif