1
/* KDevelop CMake Support
3
* Copyright 2006 Matt Rogers <mattr@kde.org>
4
* Copyright 2007 Aleix Pol <aleixpol@gmail.com>
6
* This program is free software; you can redistribute it and/or
7
* modify it under the terms of the GNU General Public License
8
* as published by the Free Software Foundation; either version 2
9
* of the License, or (at your option) any later version.
11
* This program is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU General Public License for more details.
16
* You should have received a copy of the GNU General Public License
17
* along with this program; if not, write to the Free Software
18
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
22
#include "cmakemodelitems.h"
26
#include <language/duchain/duchain.h>
27
#include <language/duchain/parsingenvironment.h>
28
#include <project/interfaces/ibuildsystemmanager.h>
30
CMakeFolderItem::CMakeFolderItem( KDevelop::IProject *project, const QString &name, const QString& build,
31
CMakeFolderItem* item)
32
: KDevelop::ProjectBuildFolderItem( project, name, item ), m_formerParent(item), m_buildDir(build)
35
QStringList CMakeFolderItem::includeDirectories() const
37
QStringList urls(m_includeList);
39
CMakeFolderItem *folder = formerParent();
42
urls += folder->includeDirectories();
43
folder = folder->formerParent();
48
KUrl CMakeExecutableTargetItem::builtUrl() const
52
ret=project()->buildSystemManager()->buildDirectory(const_cast<CMakeExecutableTargetItem*>(this));
56
ret.addPath(outputName);