2016-09-27 22:01:08 +03:00
|
|
|
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
|
|
|
file Copyright.txt or https://cmake.org/licensing for details. */
|
2013-01-02 20:10:04 +04:00
|
|
|
#ifndef cmGeneratorExpressionEvaluationFile_h
|
|
|
|
#define cmGeneratorExpressionEvaluationFile_h
|
|
|
|
|
2016-09-01 21:59:28 +03:00
|
|
|
#include <cmConfigure.h> // IWYU pragma: keep
|
|
|
|
|
2016-04-29 16:40:20 +03:00
|
|
|
#include "cmGeneratorExpression.h"
|
|
|
|
|
2016-06-28 17:17:52 +03:00
|
|
|
#include <cm_auto_ptr.hxx>
|
2016-09-01 21:59:28 +03:00
|
|
|
#include <map>
|
|
|
|
#include <string>
|
2016-05-02 22:05:39 +03:00
|
|
|
#include <sys/types.h>
|
2016-09-01 21:59:28 +03:00
|
|
|
#include <vector>
|
2013-01-02 20:10:04 +04:00
|
|
|
|
2015-08-01 13:19:32 +03:00
|
|
|
class cmLocalGenerator;
|
|
|
|
|
2013-01-02 20:10:04 +04:00
|
|
|
class cmGeneratorExpressionEvaluationFile
|
|
|
|
{
|
|
|
|
public:
|
2016-05-16 17:34:04 +03:00
|
|
|
cmGeneratorExpressionEvaluationFile(
|
|
|
|
const std::string& input,
|
2016-06-28 17:17:52 +03:00
|
|
|
CM_AUTO_PTR<cmCompiledGeneratorExpression> outputFileExpr,
|
|
|
|
CM_AUTO_PTR<cmCompiledGeneratorExpression> condition, bool inputIsContent);
|
2013-01-02 20:10:04 +04:00
|
|
|
|
2015-08-01 13:19:32 +03:00
|
|
|
void Generate(cmLocalGenerator* lg);
|
2013-01-02 20:10:04 +04:00
|
|
|
|
|
|
|
std::vector<std::string> GetFiles() const { return this->Files; }
|
|
|
|
|
2015-08-01 13:19:32 +03:00
|
|
|
void CreateOutputFile(cmLocalGenerator* lg, std::string const& config);
|
2014-11-05 01:24:54 +03:00
|
|
|
|
2013-01-02 20:10:04 +04:00
|
|
|
private:
|
2015-08-01 13:19:32 +03:00
|
|
|
void Generate(cmLocalGenerator* lg, const std::string& config,
|
|
|
|
const std::string& lang,
|
|
|
|
cmCompiledGeneratorExpression* inputExpression,
|
2016-05-16 17:34:04 +03:00
|
|
|
std::map<std::string, std::string>& outputFiles, mode_t perm);
|
2013-01-02 20:10:04 +04:00
|
|
|
|
|
|
|
private:
|
|
|
|
const std::string Input;
|
2016-06-28 17:17:52 +03:00
|
|
|
const CM_AUTO_PTR<cmCompiledGeneratorExpression> OutputFileExpr;
|
|
|
|
const CM_AUTO_PTR<cmCompiledGeneratorExpression> Condition;
|
2013-01-02 20:10:04 +04:00
|
|
|
std::vector<std::string> Files;
|
|
|
|
const bool InputIsContent;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|