STYLE: Fixed line-too-long, fixed indentation, removed trailing whitespace, added function separator comment lines.
This commit is contained in:
parent
930bb0cd37
commit
cac79e92b8
|
@ -41,7 +41,7 @@ cmTarget::cmTarget()
|
|||
this->IsImportedTarget = false;
|
||||
}
|
||||
|
||||
// define properties
|
||||
//----------------------------------------------------------------------------
|
||||
void cmTarget::DefineProperties(cmake *cm)
|
||||
{
|
||||
cm->DefineProperty
|
||||
|
@ -666,6 +666,7 @@ void cmTarget::AddSources(std::vector<std::string> const& srcs)
|
|||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
cmSourceFile* cmTarget::AddSource(const char* s)
|
||||
{
|
||||
std::string src = s;
|
||||
|
@ -679,6 +680,7 @@ cmSourceFile* cmTarget::AddSource(const char* s)
|
|||
return sf;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void cmTarget::MergeLinkLibraries( cmMakefile& mf,
|
||||
const char *selfname,
|
||||
const LinkLibraryVectorType& libs )
|
||||
|
@ -767,6 +769,7 @@ const std::vector<std::string>& cmTarget::GetLinkDirectories()
|
|||
return this->LinkDirectories;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void cmTarget::ClearDependencyInformation( cmMakefile& mf,
|
||||
const char* target )
|
||||
{
|
||||
|
@ -794,8 +797,7 @@ void cmTarget::ClearDependencyInformation( cmMakefile& mf,
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void cmTarget::AddLinkLibrary(const std::string& lib,
|
||||
LinkLibraryType llt)
|
||||
{
|
||||
|
@ -806,6 +808,7 @@ void cmTarget::AddLinkLibrary(const std::string& lib,
|
|||
this->LinkLibraries.push_back(tmp);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool cmTarget::AddFramework(const std::string& libname, LinkLibraryType llt)
|
||||
{
|
||||
(void)llt; // TODO: What is this?
|
||||
|
@ -825,6 +828,8 @@ bool cmTarget::AddFramework(const std::string& libname, LinkLibraryType llt)
|
|||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void cmTarget::AddLinkLibrary(cmMakefile& mf,
|
||||
const char *target, const char* lib,
|
||||
LinkLibraryType llt)
|
||||
|
@ -880,6 +885,7 @@ void cmTarget::AddLinkLibrary(cmMakefile& mf,
|
|||
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void
|
||||
cmTarget::AnalyzeLibDependencies( const cmMakefile& mf )
|
||||
{
|
||||
|
@ -1027,7 +1033,7 @@ cmTarget::AnalyzeLibDependencies( const cmMakefile& mf )
|
|||
this->LinkLibrariesAnalyzed = true;
|
||||
}
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void cmTarget::InsertDependency( DependencyMap& depMap,
|
||||
const LibraryID& lib,
|
||||
const LibraryID& dep)
|
||||
|
@ -1035,6 +1041,7 @@ void cmTarget::InsertDependency( DependencyMap& depMap,
|
|||
depMap[lib].push_back(dep);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void cmTarget::DeleteDependency( DependencyMap& depMap,
|
||||
const LibraryID& lib,
|
||||
const LibraryID& dep)
|
||||
|
@ -1055,6 +1062,7 @@ void cmTarget::DeleteDependency( DependencyMap& depMap,
|
|||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void cmTarget::Emit(const LibraryID lib,
|
||||
const DependencyMap& dep_map,
|
||||
std::set<LibraryID>& emitted,
|
||||
|
@ -1117,7 +1125,7 @@ void cmTarget::Emit(const LibraryID lib,
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void cmTarget::GatherDependencies( const cmMakefile& mf,
|
||||
const LibraryID& lib,
|
||||
DependencyMap& dep_map)
|
||||
|
@ -1177,7 +1185,7 @@ void cmTarget::GatherDependencies( const cmMakefile& mf,
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void cmTarget::SetProperty(const char* prop, const char* value)
|
||||
{
|
||||
if (!prop)
|
||||
|
@ -1192,11 +1200,13 @@ void cmTarget::SetProperty(const char* prop, const char* value)
|
|||
this->Properties.SetProperty(prop, value, cmProperty::TARGET);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void cmTarget::MarkAsImported()
|
||||
{
|
||||
this->IsImportedTarget = true;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
const char* cmTarget::GetDirectory(const char* config, bool implib)
|
||||
{
|
||||
if (this->IsImported())
|
||||
|
@ -1209,6 +1219,7 @@ const char* cmTarget::GetDirectory(const char* config, bool implib)
|
|||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
const char* cmTarget::ImportedGetDirectory(const char* config, bool)
|
||||
{
|
||||
const char* location=this->GetLocation(config);
|
||||
|
@ -1216,6 +1227,7 @@ const char* cmTarget::ImportedGetDirectory(const char* config, bool)
|
|||
return directory.c_str();
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
const char* cmTarget::NormalGetDirectory(const char* config, bool implib)
|
||||
{
|
||||
if(config && *config)
|
||||
|
@ -1232,6 +1244,7 @@ const char* cmTarget::NormalGetDirectory(const char* config, bool implib)
|
|||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
const char* cmTarget::GetLocation(const char* config)
|
||||
{
|
||||
if (this->IsImported())
|
||||
|
@ -1244,6 +1257,7 @@ const char* cmTarget::GetLocation(const char* config)
|
|||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
const char* cmTarget::ImportedGetLocation(const char* config)
|
||||
{
|
||||
if ((config) && (strlen(config)))
|
||||
|
@ -1260,6 +1274,7 @@ const char* cmTarget::ImportedGetLocation(const char* config)
|
|||
return this->GetProperty("LOCATION");
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
const char* cmTarget::NormalGetLocation(const char* config)
|
||||
{
|
||||
this->Location = this->GetDirectory();
|
||||
|
@ -1300,11 +1315,13 @@ void cmTarget::GetTargetVersion(int& major, int& minor)
|
|||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
const char *cmTarget::GetProperty(const char* prop)
|
||||
{
|
||||
return this->GetProperty(prop, cmProperty::TARGET);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void cmTarget::ComputeObjectFiles()
|
||||
{
|
||||
if (this->IsImported())
|
||||
|
@ -1352,7 +1369,7 @@ void cmTarget::ComputeObjectFiles()
|
|||
#endif
|
||||
}
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
const char *cmTarget::GetProperty(const char* prop,
|
||||
cmProperty::ScopeType scope)
|
||||
{
|
||||
|
@ -1369,15 +1386,16 @@ const char *cmTarget::GetProperty(const char* prop,
|
|||
// properties or variables, always recompute them
|
||||
if (!strcmp(prop,"LOCATION"))
|
||||
{
|
||||
// Set the LOCATION property of the target. Note that this cannot take
|
||||
// into account the per-configuration name of the target because the
|
||||
// configuration type may not be known at CMake time. We should
|
||||
// deprecate this feature and instead support transforming an executable
|
||||
// target name given as the command part of custom commands into the
|
||||
// proper path at build time. Alternatively we could put environment
|
||||
// variable settings in all custom commands that hold the name of the
|
||||
// target for each configuration and then give a reference to the
|
||||
// variable in the location.
|
||||
// Set the LOCATION property of the target. Note that this
|
||||
// cannot take into account the per-configuration name of the
|
||||
// target because the configuration type may not be known at
|
||||
// CMake time. We should deprecate this feature and instead
|
||||
// support transforming an executable target name given as the
|
||||
// command part of custom commands into the proper path at
|
||||
// build time. Alternatively we could put environment
|
||||
// variable settings in all custom commands that hold the name
|
||||
// of the target for each configuration and then give a
|
||||
// reference to the variable in the location.
|
||||
this->SetProperty("LOCATION", this->GetLocation(0));
|
||||
}
|
||||
|
||||
|
@ -1445,11 +1463,13 @@ const char *cmTarget::GetProperty(const char* prop,
|
|||
return retVal;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool cmTarget::GetPropertyAsBool(const char* prop)
|
||||
{
|
||||
return cmSystemTools::IsOn(this->GetProperty(prop));
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
const char* cmTarget::GetLinkerLanguage(cmGlobalGenerator* gg)
|
||||
{
|
||||
if(this->GetProperty("HAS_CXX"))
|
||||
|
@ -1512,6 +1532,7 @@ const char* cmTarget::GetLinkerLanguage(cmGlobalGenerator* gg)
|
|||
return this->GetProperty("LINKER_LANGUAGE");
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
const char* cmTarget::GetCreateRuleVariable()
|
||||
{
|
||||
switch(this->GetType())
|
||||
|
@ -1534,6 +1555,7 @@ const char* cmTarget::GetCreateRuleVariable()
|
|||
return "";
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
const char* cmTarget::GetSuffixVariableInternal(TargetType type,
|
||||
bool implib)
|
||||
{
|
||||
|
@ -1564,6 +1586,7 @@ const char* cmTarget::GetSuffixVariableInternal(TargetType type,
|
|||
}
|
||||
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
const char* cmTarget::GetPrefixVariableInternal(TargetType type,
|
||||
bool implib)
|
||||
{
|
||||
|
@ -1640,6 +1663,7 @@ std::string cmTarget::GetFullNameInternal(TargetType type, const char* config,
|
|||
return prefix+base+suffix;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void cmTarget::GetFullNameInternal(TargetType type,
|
||||
const char* config,
|
||||
bool implib,
|
||||
|
@ -1659,6 +1683,7 @@ void cmTarget::GetFullNameInternal(TargetType type,
|
|||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void cmTarget::ImportedGetFullNameInternal(TargetType ,
|
||||
const char* config,
|
||||
bool ,
|
||||
|
@ -1810,6 +1835,7 @@ void cmTarget::NormalGetFullNameInternal(TargetType type,
|
|||
outSuffix = targetSuffix?targetSuffix:"";
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void cmTarget::GetLibraryNames(std::string& name,
|
||||
std::string& soName,
|
||||
std::string& realName,
|
||||
|
@ -1822,6 +1848,7 @@ void cmTarget::GetLibraryNames(std::string& name,
|
|||
this->GetType(), config);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void cmTarget::GetLibraryCleanNames(std::string& staticName,
|
||||
std::string& sharedName,
|
||||
std::string& sharedSOName,
|
||||
|
@ -1858,6 +1885,7 @@ void cmTarget::GetLibraryCleanNames(std::string& staticName,
|
|||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void cmTarget::GetLibraryNamesInternal(std::string& name,
|
||||
std::string& soName,
|
||||
std::string& realName,
|
||||
|
@ -1955,6 +1983,7 @@ void cmTarget::GetLibraryNamesInternal(std::string& name,
|
|||
pdbName = prefix+base+".pdb";
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void cmTarget::GetExecutableNames(std::string& name,
|
||||
std::string& realName,
|
||||
std::string& impName,
|
||||
|
@ -1966,6 +1995,7 @@ void cmTarget::GetExecutableNames(std::string& name,
|
|||
this->GetType(), config);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void cmTarget::GetExecutableCleanNames(std::string& name,
|
||||
std::string& realName,
|
||||
std::string& impName,
|
||||
|
@ -1977,6 +2007,7 @@ void cmTarget::GetExecutableCleanNames(std::string& name,
|
|||
cmTarget::EXECUTABLE, config);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
void cmTarget::GetExecutableNamesInternal(std::string& name,
|
||||
std::string& realName,
|
||||
std::string& impName,
|
||||
|
|
|
@ -346,11 +346,15 @@ private:
|
|||
const char* ImportedGetLocation(const char* config);
|
||||
const char* NormalGetLocation(const char* config);
|
||||
|
||||
void NormalGetFullNameInternal(TargetType type, const char* config, bool implib,
|
||||
std::string& outPrefix, std::string& outBase,
|
||||
void NormalGetFullNameInternal(TargetType type, const char* config,
|
||||
bool implib,
|
||||
std::string& outPrefix,
|
||||
std::string& outBase,
|
||||
std::string& outSuffix);
|
||||
void ImportedGetFullNameInternal(TargetType type, const char* config, bool implib,
|
||||
std::string& outPrefix, std::string& outBase,
|
||||
void ImportedGetFullNameInternal(TargetType type, const char* config,
|
||||
bool implib,
|
||||
std::string& outPrefix,
|
||||
std::string& outBase,
|
||||
std::string& outSuffix);
|
||||
|
||||
const char* ImportedGetDirectory(const char* config, bool implib);
|
||||
|
|
Loading…
Reference in New Issue