packaging: Initial packaging
[platform/upstream/cmake.git] / Source / cmGeneratorExpressionEvaluationFile.h
1 /*============================================================================
2   CMake - Cross Platform Makefile Generator
3   Copyright 2013 Stephen Kelly <steveire@gmail.com>
4
5   Distributed under the OSI-approved BSD License (the "License");
6   see accompanying file Copyright.txt for details.
7
8   This software is distributed WITHOUT ANY WARRANTY; without even the
9   implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10   See the License for more information.
11 ============================================================================*/
12 #ifndef cmGeneratorExpressionEvaluationFile_h
13 #define cmGeneratorExpressionEvaluationFile_h
14
15 #include "cmStandardIncludes.h"
16 #include <cmsys/auto_ptr.hxx>
17
18 #include "cmGeneratorExpression.h"
19
20 //----------------------------------------------------------------------------
21 class cmGeneratorExpressionEvaluationFile
22 {
23 public:
24   cmGeneratorExpressionEvaluationFile(const std::string &input,
25         cmsys::auto_ptr<cmCompiledGeneratorExpression> outputFileExpr,
26         cmMakefile *makefile,
27         cmsys::auto_ptr<cmCompiledGeneratorExpression> condition,
28         bool inputIsContent);
29
30   void Generate();
31
32   std::vector<std::string> GetFiles() const { return this->Files; }
33
34 private:
35   void Generate(const char *config,
36               cmCompiledGeneratorExpression* inputExpression,
37               std::map<std::string, std::string> &outputFiles);
38
39 private:
40   const std::string Input;
41   const cmsys::auto_ptr<cmCompiledGeneratorExpression> OutputFileExpr;
42   cmMakefile *Makefile;
43   const cmsys::auto_ptr<cmCompiledGeneratorExpression> Condition;
44   std::vector<std::string> Files;
45   const bool InputIsContent;
46 };
47
48 #endif