~ubuntu-branches/debian/sid/kdevelop/sid

« back to all changes in this revision

Viewing changes to projectbuilders/cmakebuilder/cmakejob.h

  • Committer: Bazaar Package Importer
  • Author(s): Jeremy Lainé
  • Date: 2010-05-05 07:21:55 UTC
  • mfrom: (1.2.3 upstream) (5.1.2 squeeze)
  • Revision ID: james.westby@ubuntu.com-20100505072155-h78lx19pu04sbhtn
Tags: 4:4.0.0-2
* Upload to unstable (Closes: #579947, #481832).
* Acknowledge obsolete NMU fixes (Closes: #562410, #546961).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* KDevelop CMake Support
 
2
 *
 
3
 * Copyright 2006-2007 Andreas Pakulat <apaku@gmx.de>
 
4
 * Copyright 2008 Hamish Rodda <rodda@kde.org>
 
5
 *
 
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.
 
10
 *
 
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.
 
15
 *
 
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
 
19
 * 02110-1301, USA.
 
20
 */
 
21
 
 
22
#ifndef CMAKEJOB_H
 
23
#define CMAKEJOB_H
 
24
 
 
25
#include <outputview/outputjob.h>
 
26
#include <QProcess>
 
27
#include <QString>
 
28
 
 
29
namespace KDevelop {
 
30
class IProject;
 
31
class ProjectBaseItem;
 
32
class CommandExecutor;
 
33
}
 
34
 
 
35
class KUrl;
 
36
 
 
37
class CMakeJob: public KDevelop::OutputJob
 
38
{
 
39
    Q_OBJECT
 
40
 
 
41
public:
 
42
    enum ErrorTypes
 
43
    {
 
44
        NoProjectError = UserDefinedError,
 
45
        FailedError
 
46
    };
 
47
 
 
48
    CMakeJob(QObject* parent = 0);
 
49
    
 
50
    void setProject(KDevelop::IProject* project);
 
51
 
 
52
    virtual void start();
 
53
    
 
54
protected:
 
55
    bool doKill();
 
56
 
 
57
private Q_SLOTS:
 
58
    void slotFailed( QProcess::ProcessError );
 
59
    void slotCompleted();
 
60
 
 
61
private:
 
62
    QStringList cmakeArguments( KDevelop::IProject* project );
 
63
    KUrl buildDir( KDevelop::IProject* project );
 
64
    QString cmakeBinary( KDevelop::IProject* project );
 
65
 
 
66
    KDevelop::IProject* m_project;
 
67
    KDevelop::CommandExecutor* m_executor;
 
68
    bool m_killed;
 
69
};
 
70
 
 
71
#endif // CMAKEJOB_H