Commit 88972841 authored by dt's avatar dt
Browse files

Fixes: Show the CMakeLists.txt file in the navigation widget and completion

Task:     CMake support
Details:  No syntax highlighting
parent 6670cf1f
......@@ -111,8 +111,12 @@ void CMakeProject::parseCMakeLists()
m_projectName = cbpparser.projectName();
qDebug()<<"Building Tree";
// TODO do a intelligent updating of the tree
buildTree(m_rootNode, cbpparser.fileList());
foreach (ProjectExplorer::FileNode *fn, cbpparser.fileList())
QList<ProjectExplorer::FileNode *> fileList = cbpparser.fileList();
// Manually add the CMakeLists.txt file
fileList.append(new ProjectExplorer::FileNode(sourceDirectory + "/CMakeLists.txt", ProjectExplorer::ProjectFileType, false));
buildTree(m_rootNode, fileList);
foreach (ProjectExplorer::FileNode *fn, fileList)
m_files.append(fn->path());
m_files.sort();
......@@ -208,7 +212,7 @@ void CMakeProject::buildTree(CMakeProjectNode *rootNode, QList<ProjectExplorer::
ProjectExplorer::FolderNode *CMakeProject::findOrCreateFolder(CMakeProjectNode *rootNode, QString directory)
{
QString relativePath = QDir(QFileInfo(rootNode->path()).path()).relativeFilePath(directory);
QStringList parts = relativePath.split("/");
QStringList parts = relativePath.split("/", QString::SkipEmptyParts);
ProjectExplorer::FolderNode *parent = rootNode;
foreach (const QString &part, parts) {
// Find folder in subFolders
......
......@@ -110,7 +110,10 @@ QString CMakeManager::createXmlFile(const QStringList &arguments, const QString
buildDirectory.mkpath(buildDirectoryPath);
QProcess cmake;
cmake.setWorkingDirectory(buildDirectoryPath);
cmake.start(cmakeExecutable(), QStringList() << sourceDirectory << arguments << "-GCodeBlocks - Unix Makefiles");
QString generator = "-GCodeBlocks - Unix Makefiles";
cmake.start(cmakeExecutable(), QStringList() << sourceDirectory << arguments << generator);
qDebug()<<cmakeExecutable()<<sourceDirectory << arguments;
cmake.waitForFinished(-1);
cmake.setProcessChannelMode(QProcess::MergedChannels);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment