forked from qt-creator/qt-creator
Fixes: Some running support for cmake
Task: - RevBy: - AutoTest: - Details: Note: I need to refactor the code significantly, i'm more or less convinced that one build configuration per target is wrong. We probably want one build configuration per build directory and instead build all targets that we are interested then in the makestep. This means we won't have any cmake support for the beta.
This commit is contained in:
@@ -49,6 +49,16 @@ namespace Internal{
|
||||
|
||||
class CMakeFile;
|
||||
|
||||
struct CMakeTarget
|
||||
{
|
||||
QString title;
|
||||
QString executable;
|
||||
QString workingDirectory;
|
||||
QString makeCommand;
|
||||
QString makeCleanCommand;
|
||||
void clear();
|
||||
};
|
||||
|
||||
class CMakeProject : public ProjectExplorer::Project
|
||||
{
|
||||
Q_OBJECT
|
||||
@@ -105,6 +115,7 @@ private:
|
||||
// TODO probably need a CMake specific node structure
|
||||
CMakeProjectNode* m_rootNode;
|
||||
QStringList m_files;
|
||||
QList<CMakeTarget> m_targets;
|
||||
|
||||
protected:
|
||||
virtual void saveSettingsImpl(ProjectExplorer::PersistentSettingsWriter &writer);
|
||||
@@ -118,23 +129,27 @@ public:
|
||||
bool parseCbpFile(const QString &fileName);
|
||||
QList<ProjectExplorer::FileNode *> fileList();
|
||||
QStringList includeFiles();
|
||||
QList<CMakeTarget> targets();
|
||||
private:
|
||||
void parseCodeBlocks_project_file();
|
||||
void parseProject();
|
||||
void parseBuild();
|
||||
void parseTarget();
|
||||
void parseTargetOption();
|
||||
void parseMakeCommand();
|
||||
void parseTargetBuild();
|
||||
void parseTargetClean();
|
||||
void parseCompiler();
|
||||
void parseAdd();
|
||||
void parseUnit();
|
||||
void parseUnknownElement();
|
||||
|
||||
QSet<QString> m_targets;
|
||||
QList<ProjectExplorer::FileNode *> m_fileList;
|
||||
QStringList m_includeFiles;
|
||||
|
||||
QString m_targetOutput;
|
||||
CMakeTarget m_target;
|
||||
bool m_targetType;
|
||||
QList<CMakeTarget> m_targets;
|
||||
};
|
||||
|
||||
class CMakeFile : public Core::IFile
|
||||
|
||||
Reference in New Issue
Block a user