cmCustomCommandGenerator.h 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. /*============================================================================
  2. CMake - Cross Platform Makefile Generator
  3. Copyright 2000-2010 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 cmCustomCommandGenerator_h
  11. #define cmCustomCommandGenerator_h
  12. #include <cmConfigure.h> // IWYU pragma: keep
  13. #include <string>
  14. #include <vector>
  15. class cmCustomCommand;
  16. class cmGeneratorExpression;
  17. class cmLocalGenerator;
  18. class cmCustomCommandGenerator
  19. {
  20. cmCustomCommand const& CC;
  21. std::string Config;
  22. cmLocalGenerator* LG;
  23. bool OldStyle;
  24. bool MakeVars;
  25. cmGeneratorExpression* GE;
  26. mutable bool DependsDone;
  27. mutable std::vector<std::string> Depends;
  28. public:
  29. cmCustomCommandGenerator(cmCustomCommand const& cc,
  30. const std::string& config, cmLocalGenerator* lg);
  31. ~cmCustomCommandGenerator();
  32. cmCustomCommand const& GetCC() const { return this->CC; }
  33. unsigned int GetNumberOfCommands() const;
  34. std::string GetCommand(unsigned int c) const;
  35. bool UseCrossCompilingEmulator(unsigned int c) const;
  36. void AppendArguments(unsigned int c, std::string& cmd) const;
  37. const char* GetComment() const;
  38. std::string GetWorkingDirectory() const;
  39. std::vector<std::string> const& GetOutputs() const;
  40. std::vector<std::string> const& GetByproducts() const;
  41. std::vector<std::string> const& GetDepends() const;
  42. };
  43. #endif