Code::Blocks  SVN r11506
compiletargetbase.h
Go to the documentation of this file.
1 /*
2  * This file is part of the Code::Blocks IDE and licensed under the GNU Lesser General Public License, version 3
3  * http://www.gnu.org/licenses/lgpl-3.0.html
4  */
5 
6 #ifndef COMPILETARGETBASE_H
7 #define COMPILETARGETBASE_H
8 
9 #include "compileoptionsbase.h"
10 
13 {
21 };
22 
25 {
30 };
31 
34 {
40  ttNative = 5
41 };
42 
44 {
45  mcClean = 0,
51 
54 };
55 
61 {
64 };
65 
78 {
79  public:
81  ~CompileTargetBase() override;
82 
108  virtual void SetTargetFilenameGenerationPolicy(TargetFilenameGenerationPolicy prefix,
110  virtual void GetTargetFilenameGenerationPolicy(TargetFilenameGenerationPolicy& prefixOut,
111  TargetFilenameGenerationPolicy& extensionOut) const;
112 
113  virtual const wxString& GetFilename() const;
114  virtual const wxString& GetTitle() const;
115  virtual void SetTitle(const wxString& title);
116  virtual void SetOutputFilename(const wxString& filename);
117  virtual void SetImportLibraryFilename(const wxString& filename);
118  virtual void SetDefinitionFileFilename(const wxString& filename);
119  virtual void SetWorkingDir(const wxString& dirname);
120  virtual void SetObjectOutput(const wxString& dirname);
121  virtual void SetDepsOutput(const wxString& dirname);
122  virtual OptionsRelation GetOptionRelation(OptionsRelationType type) const;
123  virtual void SetOptionRelation(OptionsRelationType type, OptionsRelation rel);
124  virtual wxString GetWorkingDir();
125  virtual wxString GetObjectOutput() const;
126  virtual wxString GetDepsOutput() const;
127  virtual wxString GetOutputFilename();
128  virtual wxString SuggestOutputFilename();
129  virtual wxString GetExecutableFilename() const;
130  virtual wxString GetDynamicLibFilename();
131  virtual wxString GetDynamicLibImportFilename();
132  virtual wxString GetDynamicLibDefFilename();
133  virtual wxString GetStaticLibFilename();
134  virtual wxString GetNativeFilename();
135  virtual wxString GetBasePath() const;
136  virtual void SetTargetType(TargetType pt);
137  virtual TargetType GetTargetType() const;
138  virtual const wxString& GetExecutionParameters() const;
139  virtual void SetExecutionParameters(const wxString& params);
140  virtual const wxString& GetHostApplication() const;
141  virtual void SetHostApplication(const wxString& app);
142  virtual bool GetRunHostApplicationInTerminal() const;
143  virtual void SetRunHostApplicationInTerminal(bool in_terminal);
144  virtual void SetCompilerID(const wxString& id);
145  virtual const wxString& GetCompilerID() const { return m_CompilerId; }
146  virtual wxString GetMakeCommandFor(MakeCommand cmd) const { return m_MakeCommands[cmd]; }
147  virtual void SetMakeCommandFor(MakeCommand cmd, const wxString& make);
148  virtual bool MakeCommandsModified() const { return m_MakeCommandsModified; }
149  protected:
150  friend class cbProject;
151 
170  private:
171  void GenerateTargetFilename(wxString& filename) const;
172 };
173 
174 #endif // COMPILETARGETBASE_H
TargetFilenameGenerationPolicy
A target's filename can either be auto-generated based on the running platform, or completely specifi...
wxString m_MakeCommands[mcLast]
Linker include dir option.
MakeCommand
void GenerateTargetFilename(wxString &filename) const
The option uses parent options only.
The option uses target options appended to parent options.
TargetFilenameGenerationPolicy m_PrefixGenerationPolicy
Target produces an executable.
Generate filename based on running platform defaults.
wxString m_ImportLibraryFilename
wxString m_DefinitionFileFilename
wxString m_ExecutionParameters
TargetFilenameGenerationPolicy m_ExtensionGenerationPolicy
virtual bool MakeCommandsModified() const
True if any of the "make" commands is modified.
Don't use this. It's only used internally for enumerations...
#define DLLIMPORT
Definition: settings.h:16
Represents a Code::Blocks project.
Definition: cbproject.h:96
virtual wxString GetMakeCommandFor(MakeCommand cmd) const
Get the "make" command used for cmd.
Resource compiler include dir option.
Target produces a dynamic library.
OptionsRelation
Option's relation.
The option uses parent options appended to target options.
Target produces a native binary.
Compiler include dir option.
This is a base class for all classes needing compilation parameters.
OptionsRelation m_OptionsRelation[ortLast]
No automatic generation; let the user specify the full filename.
Target produces a static library.
virtual const wxString & GetCompilerID() const
Read the target's compiler.
Target produces a console executable (without GUI) (distinction between ttExecutable and ttConsoleOnl...
Linker option.
Compiler option.
The option uses target options only.
TargetType
Enum to define the type of output the target produces.
OptionsRelationType
Enum that defines the option's relation types.
Base class for build target classes Each Code::Blocks project consists of at least one target...
Target only runs commands in pre-build and/or post-build steps.