/usr/include/codeblocks/projectbuildtarget.h is in codeblocks-dev 10.05-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 | /*
* This file is part of the Code::Blocks IDE and licensed under the GNU Lesser General Public License, version 3
* http://www.gnu.org/licenses/lgpl-3.0.html
*/
#ifndef PROJECTBUILDTARGET_H
#define PROJECTBUILDTARGET_H
#include "settings.h"
#include "globals.h"
#include "compiletargetbase.h"
#include "projectfile.h"
#include <wx/dynarray.h>
#include <wx/filename.h>
#include <wx/list.h>
#include <wx/treectrl.h>
#include "blockallocated.h"
class cbProject;
class ProjectBuildTarget;
WX_DEFINE_ARRAY(ProjectBuildTarget*, BuildTargets);
/** Represents a Code::Blocks project build target. */
class DLLIMPORT ProjectBuildTarget : public BlockAllocated<ProjectBuildTarget, 1000>, public CompileTargetBase
{
public:
/// Constructor
ProjectBuildTarget(cbProject* parentProject);
/// Destructor
~ProjectBuildTarget();
/** @return The target's parent project. */
virtual cbProject* GetParentProject();
/** @return The full title, i.e. "projectname - targetname". */
virtual wxString GetFullTitle() const;
//properties
/** @return A string containing a list of all the external files this target depends on.
* If any of the files in this list is newer than the target's output, the target is relinked.
*/
virtual const wxString& GetExternalDeps() const;
/** Set a list of all the external files this targets depends on.
* If any of the files in this list is newer than the target's output, the target is relinked.
* @param deps A string containing the list of files.
*/
virtual void SetExternalDeps(const wxString& deps);
/** @return A string containing a list of additional output files, besides the main output.
* If any of the files in this list is older than the list returned by
* GetExternalDeps(), the target is relinked.
*/
virtual const wxString& GetAdditionalOutputFiles() const;
/** Set a list of all additional output files this targets creates, besides its main output.
* If any of the files in this list is older than the list returned by
* GetExternalDeps(), the target is relinked.
* @param files A string containing the list of additional files.
*/
virtual void SetAdditionalOutputFiles(const wxString& files);
/** Deprecated, do not use at all!
* @return True if this target should be built when the virtual target "All" is selected, false if not. */
virtual bool GetIncludeInTargetAll() const;
/** Deprecated, do not use at all!
* Set if this target should be built when the virtual target "All" is selected.
* @param buildIt If true, the target will be built with "All" else it won't. */
virtual void SetIncludeInTargetAll(bool buildIt);
/** Valid only for targets generating dynamic libraries (DLLs or SOs).
* @return True if the target creates a DEF imports file. */
virtual bool GetCreateDefFile() const;
/** Set if the target creates a DEF imports file.
* Valid only for targets generating dynamic libraries (DLLs or SOs).
* @param createIt If true, a DEF file is generated else it is not. */
virtual void SetCreateDefFile(bool createIt);
/** Valid only for targets generating dynamic libraries (DLLs or SOs).
* @return True if an import library will be created, false if not. */
virtual bool GetCreateStaticLib();
/** Set if an import library should be created.
* Valid only for targets generating dynamic libraries (DLLs or SOs).
* @param createIt If true, an import library will be created else it will not. */
virtual void SetCreateStaticLib(bool createIt);
/** Valid only for targets generating a console executable.
* ConsoleRunner is an external utility program that waits for a keypress
* after the target is executed.
* @return True if ConsoleRunner should be used, false if not. */
virtual bool GetUseConsoleRunner() const;
/** Set if ConsoleRunner should be used.
* Valid only for targets generating a console executable.
* ConsoleRunner is an external utility program that waits for a keypress
* after the target is executed.
* @param useIt If true, ConsoleRunner is used else it is not. */
virtual void SetUseConsoleRunner(bool useIt);
virtual void SetTargetType(const TargetType& pt); // overriden
/** Targets to be compiled (if necessary) before this one.
* Add a target to the list of dependencies of this target. Be careful
* not to add a target more than once.
* @param target The build target to add as a dependency.
*/
virtual void AddTargetDep(ProjectBuildTarget* target);
/** @return A list of dependency targets of this target. */
virtual BuildTargets& GetTargetDeps();
/** Provides an easy way to iterate all the files belonging in this target.
* @return A list of files belonging in this target. */
virtual FilesList& GetFilesList(){ return m_Files; }
private:
friend class ProjectFile; // to allow it to add/remove files in FilesList
cbProject* m_Project;
wxString m_ExternalDeps;
wxString m_AdditionalOutputFiles;
BuildTargets m_TargetDeps;
FilesList m_Files;
bool m_BuildWithAll; // obsolete: left just to convert old projects to use virtual targets
bool m_CreateStaticLib;
bool m_CreateDefFile;
bool m_UseConsoleRunner;
};
#endif // PROJECTBUILDTARGET_H
|