1
0

cmCustomCommandGenerator.h 1.7 KB

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