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 "cmStandardIncludes.h"
  13. #include <cmsys/auto_ptr.hxx>
  14. #include "cmGeneratorExpression.h"
  15. //----------------------------------------------------------------------------
  16. class cmGeneratorExpressionEvaluationFile
  17. {
  18. public:
  19. cmGeneratorExpressionEvaluationFile(const std::string &input,
  20. cmsys::auto_ptr<cmCompiledGeneratorExpression> outputFileExpr,
  21. cmMakefile *makefile,
  22. cmsys::auto_ptr<cmCompiledGeneratorExpression> condition,
  23. bool inputIsContent);
  24. void Generate();
  25. std::vector<std::string> GetFiles() const { return this->Files; }
  26. void CreateOutputFile(std::string const& config);
  27. private:
  28. void Generate(const std::string& config, 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 cmsys::auto_ptr<cmCompiledGeneratorExpression> OutputFileExpr;
  34. cmMakefile *Makefile;
  35. const cmsys::auto_ptr<cmCompiledGeneratorExpression> Condition;
  36. std::vector<std::string> Files;
  37. const bool InputIsContent;
  38. };
  39. #endif