RedPanda-CPP/RedPandaIDE/compiler/projectcompiler.h

40 lines
1012 B
C
Raw Normal View History

2021-09-13 07:49:36 +08:00
#ifndef PROJECTCOMPILER_H
#define PROJECTCOMPILER_H
#include "compiler.h"
#include <QObject>
class Project;
class ProjectCompiler : public Compiler
{
Q_OBJECT
public:
ProjectCompiler(std::shared_ptr<Project> project, bool silent,bool onlyCheckSyntax);
2021-09-17 19:58:37 +08:00
void buildMakeFile();
2021-09-13 07:49:36 +08:00
bool onlyClean() const;
void setOnlyClean(bool newOnlyClean);
2021-09-13 07:49:36 +08:00
private:
2021-09-13 10:48:44 +08:00
void createStandardMakeFile();
2021-09-13 22:45:50 +08:00
void createStaticMakeFile();
void createDynamicMakeFile();
2021-09-13 10:48:44 +08:00
void newMakeFile(QFile& file);
void writeMakeHeader(QFile& file);
void writeMakeDefines(QFile& file);
2021-09-13 19:09:15 +08:00
void writeMakeTarget(QFile& file);
2021-09-13 22:45:50 +08:00
void writeMakeIncludes(QFile& file);
void writeMakeClean(QFile& file);
void writeMakeObjFilesRules(QFile& file);
2021-09-13 10:48:44 +08:00
void writeln(QFile& file, const QString& s="");
2021-09-13 07:49:36 +08:00
// Compiler interface
private:
bool mOnlyClean;
2021-09-13 07:49:36 +08:00
protected:
bool prepareForCompile() override;
QString pipedText() override;
bool prepareForRebuild() override;
};
#endif // PROJECTCOMPILER_H