cmake/Source/cmCustomCommandGenerator.h

47 lines
1.4 KiB
C
Raw Normal View History

2016-10-30 18:24:19 +01:00
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
file Copyright.txt or https://cmake.org/licensing for details. */
2011-01-16 11:35:12 +01:00
#ifndef cmCustomCommandGenerator_h
#define cmCustomCommandGenerator_h
2017-07-20 19:35:53 +02:00
#include "cmConfigure.h" // IWYU pragma: keep
2017-04-14 19:02:05 +02:00
#include "cmCustomCommandLines.h"
2016-10-30 18:24:19 +01:00
#include <string>
#include <vector>
2011-01-16 11:35:12 +01:00
class cmCustomCommand;
class cmGeneratorExpression;
2016-10-30 18:24:19 +01:00
class cmLocalGenerator;
2011-01-16 11:35:12 +01:00
class cmCustomCommandGenerator
{
cmCustomCommand const& CC;
2015-04-27 22:25:09 +02:00
std::string Config;
2011-01-16 11:35:12 +01:00
cmLocalGenerator* LG;
bool OldStyle;
bool MakeVars;
cmGeneratorExpression* GE;
2017-04-14 19:02:05 +02:00
cmCustomCommandLines CommandLines;
2018-01-26 17:06:56 +01:00
std::vector<std::string> Depends;
2017-04-14 19:02:05 +02:00
const char* GetCrossCompilingEmulator(unsigned int c) const;
const char* GetArgv0Location(unsigned int c) const;
2016-07-09 11:21:54 +02:00
2011-01-16 11:35:12 +01:00
public:
2015-04-27 22:25:09 +02:00
cmCustomCommandGenerator(cmCustomCommand const& cc,
2016-07-09 11:21:54 +02:00
const std::string& config, cmLocalGenerator* lg);
2011-01-16 11:35:12 +01:00
~cmCustomCommandGenerator();
2015-04-27 22:25:09 +02:00
cmCustomCommand const& GetCC() const { return this->CC; }
2011-01-16 11:35:12 +01:00
unsigned int GetNumberOfCommands() const;
std::string GetCommand(unsigned int c) const;
void AppendArguments(unsigned int c, std::string& cmd) const;
2015-04-27 22:25:09 +02:00
const char* GetComment() const;
std::string GetWorkingDirectory() const;
std::vector<std::string> const& GetOutputs() const;
std::vector<std::string> const& GetByproducts() const;
std::vector<std::string> const& GetDepends() const;
2018-01-26 17:06:56 +01:00
bool HasOnlyEmptyCommandLines() const;
2011-01-16 11:35:12 +01:00
};
#endif