Menu

[r6913]: / branches / wxsmith_addons / src / sdk / projectbuildtarget.cpp  Maximize  Restore  History

Download this file

149 lines (124 with data), 3.2 kB

  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
134
135
136
137
138
139
140
141
142
143
144
145
146
147
/*
* 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
*
* $Revision$
* $Id$
* $HeadURL$
*/
#include "sdk_precomp.h"
#ifndef CB_PRECOMP
#include "projectbuildtarget.h" // class's header file
#include "cbproject.h"
#include "manager.h"
#include "projectmanager.h"
#include "macrosmanager.h"
#include "globals.h"
#endif
// class constructor
ProjectBuildTarget::ProjectBuildTarget(cbProject* parentProject) : m_Project(parentProject)
{
m_BuildWithAll = false;
m_CreateStaticLib = true;
m_CreateDefFile = true;
m_UseConsoleRunner = true;
}
// class destructor
ProjectBuildTarget::~ProjectBuildTarget()
{
}
cbProject* ProjectBuildTarget::GetParentProject()
{
return m_Project;
}
wxString ProjectBuildTarget::GetFullTitle() const
{
return m_Project->GetTitle() + _T(" - ") + GetTitle();
}
const wxString & ProjectBuildTarget::GetExternalDeps() const
{
return m_ExternalDeps;
}
void ProjectBuildTarget::SetExternalDeps(const wxString& deps)
{
if (m_ExternalDeps != deps)
{
m_ExternalDeps = deps;
SetModified(true);
}
}
const wxString & ProjectBuildTarget::GetAdditionalOutputFiles() const
{
return m_AdditionalOutputFiles;
}
void ProjectBuildTarget::SetAdditionalOutputFiles(const wxString& files)
{
if (m_AdditionalOutputFiles != files)
{
m_AdditionalOutputFiles = files;
SetModified(true);
}
}
bool ProjectBuildTarget::GetIncludeInTargetAll() const
{
return m_BuildWithAll;
}
void ProjectBuildTarget::SetIncludeInTargetAll(bool buildIt)
{
if (m_BuildWithAll != buildIt)
{
m_BuildWithAll = buildIt;
SetModified(true);
}
}
bool ProjectBuildTarget::GetCreateDefFile() const
{
return m_CreateDefFile;
}
void ProjectBuildTarget::SetCreateDefFile(bool createIt)
{
if (m_CreateDefFile != createIt)
{
m_CreateDefFile = createIt;
SetModified(true);
}
}
bool ProjectBuildTarget::GetCreateStaticLib()
{
return m_CreateStaticLib;
}
void ProjectBuildTarget::SetCreateStaticLib(bool createIt)
{
if (m_CreateStaticLib != createIt)
{
m_CreateStaticLib = createIt;
SetModified(true);
}
}
bool ProjectBuildTarget::GetUseConsoleRunner() const
{
return GetTargetType() == ttConsoleOnly ? m_UseConsoleRunner : false;
}
void ProjectBuildTarget::SetUseConsoleRunner(bool useIt)
{
if (GetTargetType() == ttConsoleOnly && useIt != m_UseConsoleRunner)
{
m_UseConsoleRunner = useIt;
SetModified(true);
}
}
void ProjectBuildTarget::SetTargetType(const TargetType& pt)
{
TargetType ttold = GetTargetType();
CompileTargetBase::SetTargetType(pt);
if (ttold != GetTargetType() && GetTargetType() == ttConsoleOnly)
SetUseConsoleRunner(true); // by default, use console runner
}
// target dependencies: targets to be compiled (if necessary) before this one
void ProjectBuildTarget::AddTargetDep(ProjectBuildTarget* target) {
m_TargetDeps.Add(target);
}
// get the list of dependency targets of this target
BuildTargets& ProjectBuildTarget::GetTargetDeps() {
return m_TargetDeps;
}
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.