cmCustomCommandGenerator.h 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  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. const char* GetCrossCompilingEmulator(unsigned int c) const;
  23. const char* GetArgv0Location(unsigned int c) const;
  24. public:
  25. cmCustomCommandGenerator(cmCustomCommand const& cc,
  26. const std::string& config, cmLocalGenerator* lg);
  27. ~cmCustomCommandGenerator();
  28. cmCustomCommand const& GetCC() const { return this->CC; }
  29. unsigned int GetNumberOfCommands() const;
  30. std::string GetCommand(unsigned int c) const;
  31. void AppendArguments(unsigned int c, std::string& cmd) const;
  32. const char* GetComment() const;
  33. std::string GetWorkingDirectory() const;
  34. std::vector<std::string> const& GetOutputs() const;
  35. std::vector<std::string> const& GetByproducts() const;
  36. std::vector<std::string> const& GetDepends() const;
  37. bool HasOnlyEmptyCommandLines() const;
  38. };
  39. #endif