cmGeneratorExpressionEvaluationFile.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. /*============================================================================
  2. CMake - Cross Platform Makefile Generator
  3. Copyright 2013 Stephen Kelly <[email protected]>
  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 cmGeneratorExpressionEvaluationFile_h
  11. #define cmGeneratorExpressionEvaluationFile_h
  12. #include <cmConfigure.h> // IWYU pragma: keep
  13. #include "cmGeneratorExpression.h"
  14. #include <cm_auto_ptr.hxx>
  15. #include <map>
  16. #include <string>
  17. #include <sys/types.h>
  18. #include <vector>
  19. class cmLocalGenerator;
  20. class cmGeneratorExpressionEvaluationFile
  21. {
  22. public:
  23. cmGeneratorExpressionEvaluationFile(
  24. const std::string& input,
  25. CM_AUTO_PTR<cmCompiledGeneratorExpression> outputFileExpr,
  26. CM_AUTO_PTR<cmCompiledGeneratorExpression> condition, bool inputIsContent);
  27. void Generate(cmLocalGenerator* lg);
  28. std::vector<std::string> GetFiles() const { return this->Files; }
  29. void CreateOutputFile(cmLocalGenerator* lg, std::string const& config);
  30. private:
  31. void Generate(cmLocalGenerator* lg, const std::string& config,
  32. const std::string& lang,
  33. cmCompiledGeneratorExpression* inputExpression,
  34. std::map<std::string, std::string>& outputFiles, mode_t perm);
  35. private:
  36. const std::string Input;
  37. const CM_AUTO_PTR<cmCompiledGeneratorExpression> OutputFileExpr;
  38. const CM_AUTO_PTR<cmCompiledGeneratorExpression> Condition;
  39. std::vector<std::string> Files;
  40. const bool InputIsContent;
  41. };
  42. #endif