cmGeneratorExpressionEvaluationFile.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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 "cmGeneratorExpression.h"
  13. #include <cm_auto_ptr.hxx>
  14. #include <sys/types.h>
  15. class cmLocalGenerator;
  16. class cmGeneratorExpressionEvaluationFile
  17. {
  18. public:
  19. cmGeneratorExpressionEvaluationFile(
  20. const std::string& input,
  21. CM_AUTO_PTR<cmCompiledGeneratorExpression> outputFileExpr,
  22. CM_AUTO_PTR<cmCompiledGeneratorExpression> condition, bool inputIsContent);
  23. void Generate(cmLocalGenerator* lg);
  24. std::vector<std::string> GetFiles() const { return this->Files; }
  25. void CreateOutputFile(cmLocalGenerator* lg, std::string const& config);
  26. private:
  27. void Generate(cmLocalGenerator* lg, const std::string& config,
  28. const std::string& lang,
  29. cmCompiledGeneratorExpression* inputExpression,
  30. std::map<std::string, std::string>& outputFiles, mode_t perm);
  31. private:
  32. const std::string Input;
  33. const CM_AUTO_PTR<cmCompiledGeneratorExpression> OutputFileExpr;
  34. const CM_AUTO_PTR<cmCompiledGeneratorExpression> Condition;
  35. std::vector<std::string> Files;
  36. const bool InputIsContent;
  37. };
  38. #endif