File: CMakeBuilder.h

package info (click to toggle)
codelite 14.0%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 112,816 kB
  • sloc: cpp: 483,662; ansic: 150,144; php: 9,569; lex: 4,186; python: 3,417; yacc: 2,820; sh: 1,147; makefile: 52; xml: 13
file content (86 lines) | stat: -rw-r--r-- 3,150 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
#ifndef CMAKEBUILDER_H
#define CMAKEBUILDER_H

#include "builder.h" // Base class: Builder

class CMakeBuilder : public Builder
{
public:
    virtual wxString GetOutputFile() const;
    static wxString GetWorkspaceBuildFolder(bool wrapWithQuotes);
    static wxString GetProjectBuildFolder(const wxString& project, bool wrapWithQuotes);

private:
    wxString GetBuildToolCommand(const wxString& project, const wxString& confToBuild) const;

public:
    CMakeBuilder();
    virtual ~CMakeBuilder();
    /**
     * Export the build system specific file (e.g. GNU makefile, Ant file etc)
     * to allow users to invoke them manualy from the command line
     * \param project project to export.
     * \param errMsg output
     * \return true on success, false otherwise.
     */
    virtual bool Export(const wxString& project, const wxString& confToBuild, const wxString& arguments,
        bool isProjectOnly, bool force, wxString& errMsg);

    /**
     * Return the command that should be executed for performing the clean
     * task
     */
    virtual wxString GetCleanCommand(const wxString& project, const wxString& confToBuild, const wxString& arguments);

    /**
     * Return the command that should be executed for performing the build
     * task for a given project
     */
    virtual wxString GetBuildCommand(const wxString& project, const wxString& confToBuild, const wxString& arguments);

    //-----------------------------------------------------------------
    // Project Only API
    //-----------------------------------------------------------------
    /**
     * Return the command that should be executed for performing the clean
     * task - for the project only (excluding dependencies)
     */
    virtual wxString GetPOCleanCommand(const wxString& project, const wxString& confToBuild, const wxString& arguments);

    /**
     * Return the command that should be executed for performing the build
     * task for a given project - for the project only (excluding dependencies)
     */
    virtual wxString GetPOBuildCommand(const wxString& project, const wxString& confToBuild, const wxString& arguments);

    /**
     * \brief create a command to execute for compiling single source file
     * \param project
     * \param fileName
     * \param errMsg [output]
     * \return the command
     */
    virtual wxString GetSingleFileCmd(
        const wxString& project, const wxString& confToBuild, const wxString& arguments, const wxString& fileName);

    /**
     * \brief create a command to execute for preprocessing single source file
     * \param project
     * \param fileName
     * \param errMsg [output]
     * \return the command
     */
    virtual wxString GetPreprocessFileCmd(const wxString& project, const wxString& confToBuild,
        const wxString& arguments, const wxString& fileName, wxString& errMsg);

    /**
     * @brief return the 'rebuild' command
     * @param project
     * @param confToBuild
     * @return
     */
    virtual wxString GetPORebuildCommand(
        const wxString& project, const wxString& confToBuild, const wxString& arguments);
};

#endif // CMAKEBUILDER_H