cmake/Source/cmCustomCommandGenerator.h

52 lines
1.7 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
2016-10-30 18:24:19 +01:00
#include <string>
#include <vector>
2011-01-16 11:35:12 +01:00
2020-02-01 23:06:01 +01:00
#include "cmCustomCommandLines.h"
2011-01-16 11:35:12 +01:00
class cmCustomCommand;
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;
2017-04-14 19:02:05 +02:00
cmCustomCommandLines CommandLines;
2019-11-11 23:01:05 +01:00
std::vector<std::vector<std::string>> EmulatorsWithArguments;
2020-02-01 23:06:01 +01:00
std::vector<std::string> Byproducts;
2018-01-26 17:06:56 +01:00
std::vector<std::string> Depends;
2018-10-28 12:09:07 +01:00
std::string WorkingDirectory;
2017-04-14 19:02:05 +02:00
2019-11-11 23:01:05 +01:00
void FillEmulatorsWithArguments();
std::vector<std::string> GetCrossCompilingEmulator(unsigned int c) const;
2017-04-14 19:02:05 +02:00
const char* GetArgv0Location(unsigned int c) const;
2016-07-09 11:21:54 +02:00
2011-01-16 11:35:12 +01:00
public:
2019-11-11 23:01:05 +01:00
cmCustomCommandGenerator(cmCustomCommand const& cc, std::string config,
cmLocalGenerator* lg);
cmCustomCommandGenerator(const cmCustomCommandGenerator&) = delete;
cmCustomCommandGenerator& operator=(const cmCustomCommandGenerator&) =
delete;
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