[Cmake-commits] CMake branch, next, updated. v3.0.0-4223-g3219a61
Brad King
brad.king at kitware.com
Mon Jul 14 10:02:14 EDT 2014
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, next has been updated
via 3219a6127fc6fbcaac53cbe224e7eb6681818471 (commit)
via 102eea60cd636e06ab87bc94a4b326682d7464f1 (commit)
via b0f57408512b194923b6c9e5e79a08bc324c552e (commit)
via c69e8a5580bd034dcaa1d7d53976200600b26b82 (commit)
via 4db3990e9f3c11add85cba339b7a976f6f0fd3c5 (commit)
via 4b8130b8de223674d567bdff5e156b1bdc1d5c27 (commit)
via 4c763dd1f1c922606660e275372cc6313ac42535 (commit)
via 190cabe7c1641482529bba34d46a38e4e33a2384 (commit)
from a159995cc1af2563601fe840e85ab875ea347a37 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3219a6127fc6fbcaac53cbe224e7eb6681818471
commit 3219a6127fc6fbcaac53cbe224e7eb6681818471
Merge: a159995 102eea6
Author: Brad King <brad.king at kitware.com>
AuthorDate: Mon Jul 14 10:02:13 2014 -0400
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Mon Jul 14 10:02:13 2014 -0400
Merge topic 'refactor-link-internals' into next
102eea60 cmTarget: Simplify internal ComputeLinkInterfaceLibraries method
b0f57408 cmTarget: Move ComputeLinkInterfaceLibraries to internals
c69e8a55 cmTarget: Refactor internal LinkInterface map
4db3990e cmTarget: Drop 'head' argument from processSources
4b8130b8 cmTarget: Drop 'head' argument from GetSourceFiles
4c763dd1 cmTarget: Drop 'head' argument from GetLanguages
190cabe7 cmTarget: Drop 'head' argument from ComputeLinkImplementationLanguages
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=102eea60cd636e06ab87bc94a4b326682d7464f1
commit 102eea60cd636e06ab87bc94a4b326682d7464f1
Author: Brad King <brad.king at kitware.com>
AuthorDate: Thu Jul 10 17:15:39 2014 -0400
Commit: Brad King <brad.king at kitware.com>
CommitDate: Mon Jul 14 10:00:51 2014 -0400
cmTarget: Simplify internal ComputeLinkInterfaceLibraries method
Now that the method can see the full OptionalLinkInterface structure,
store information there instead of passing it through arguments.
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 663b15e..826a44b 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -122,14 +122,12 @@ public:
void ComputeLinkInterface(cmTarget const* thisTarget,
const std::string& config,
OptionalLinkInterface& iface,
- cmTarget const* head,
- const char *explicitLibraries) const;
- const char* ComputeLinkInterfaceLibraries(cmTarget const* thisTarget,
- const std::string& config,
- OptionalLinkInterface& iface,
- cmTarget const* head,
- bool usage_requirements_only,
- bool &exists);
+ cmTarget const* head) const;
+ void ComputeLinkInterfaceLibraries(cmTarget const* thisTarget,
+ const std::string& config,
+ OptionalLinkInterface& iface,
+ cmTarget const* head,
+ bool usage_requirements_only);
typedef std::map<TargetConfigPair, OptionalLinkInterface>
LinkInterfaceMapType;
@@ -5908,17 +5906,15 @@ cmTarget::LinkInterface const* cmTarget::GetLinkInterface(
if(!iface.LibrariesDone)
{
iface.LibrariesDone = true;
- iface.ExplicitLibraries =
- this->Internal->ComputeLinkInterfaceLibraries(
- this, config, iface, head, false, iface.Exists);
+ this->Internal->ComputeLinkInterfaceLibraries(
+ this, config, iface, head, false);
}
if(!iface.AllDone)
{
iface.AllDone = true;
if(iface.Exists)
{
- this->Internal->ComputeLinkInterface(this, config, iface,
- head, iface.ExplicitLibraries);
+ this->Internal->ComputeLinkInterface(this, config, iface, head);
}
}
@@ -5956,9 +5952,8 @@ cmTarget::GetLinkInterfaceLibraries(const std::string& config,
if(!iface.LibrariesDone)
{
iface.LibrariesDone = true;
- iface.ExplicitLibraries =
- this->Internal->ComputeLinkInterfaceLibraries(
- this, config, iface, head, usage_requirements_only, iface.Exists);
+ this->Internal->ComputeLinkInterfaceLibraries(
+ this, config, iface, head, usage_requirements_only);
}
return iface.Exists? &iface : 0;
@@ -6081,14 +6076,13 @@ void cmTarget::GetTransitivePropertyTargets(const std::string& config,
}
//----------------------------------------------------------------------------
-const char*
+void
cmTargetInternals::ComputeLinkInterfaceLibraries(
cmTarget const* thisTarget,
const std::string& config,
OptionalLinkInterface& iface,
cmTarget const* headTarget,
- bool usage_requirements_only,
- bool &exists)
+ bool usage_requirements_only)
{
// Construct the property name suffix for this configuration.
std::string suffix = "_";
@@ -6165,10 +6159,10 @@ cmTargetInternals::ComputeLinkInterfaceLibraries(
(thisTarget->GetType() == cmTarget::EXECUTABLE ||
(thisTarget->GetType() == cmTarget::MODULE_LIBRARY)))
{
- exists = false;
- return 0;
+ return;
}
- exists = true;
+ iface.Exists = true;
+ iface.ExplicitLibraries = explicitLibraries;
if(explicitLibraries)
{
@@ -6247,17 +6241,15 @@ cmTargetInternals::ComputeLinkInterfaceLibraries(
}
}
}
- return explicitLibraries;
}
//----------------------------------------------------------------------------
void cmTargetInternals::ComputeLinkInterface(cmTarget const* thisTarget,
const std::string& config,
OptionalLinkInterface& iface,
- cmTarget const* headTarget,
- const char* explicitLibraries) const
+ cmTarget const* headTarget) const
{
- if(explicitLibraries)
+ if(iface.ExplicitLibraries)
{
if(thisTarget->GetType() == cmTarget::SHARED_LIBRARY
|| thisTarget->GetType() == cmTarget::STATIC_LIBRARY
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b0f57408512b194923b6c9e5e79a08bc324c552e
commit b0f57408512b194923b6c9e5e79a08bc324c552e
Author: Brad King <brad.king at kitware.com>
AuthorDate: Thu Jul 10 17:05:35 2014 -0400
Commit: Brad King <brad.king at kitware.com>
CommitDate: Mon Jul 14 09:55:52 2014 -0400
cmTarget: Move ComputeLinkInterfaceLibraries to internals
There are no external callers, and this will allow the method to see
the full OptionalLinkInterface internal structure.
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 3361a81..663b15e 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -124,6 +124,12 @@ public:
OptionalLinkInterface& iface,
cmTarget const* head,
const char *explicitLibraries) const;
+ const char* ComputeLinkInterfaceLibraries(cmTarget const* thisTarget,
+ const std::string& config,
+ OptionalLinkInterface& iface,
+ cmTarget const* head,
+ bool usage_requirements_only,
+ bool &exists);
typedef std::map<TargetConfigPair, OptionalLinkInterface>
LinkInterfaceMapType;
@@ -5903,8 +5909,8 @@ cmTarget::LinkInterface const* cmTarget::GetLinkInterface(
{
iface.LibrariesDone = true;
iface.ExplicitLibraries =
- this->ComputeLinkInterfaceLibraries(config, iface, head, false,
- iface.Exists);
+ this->Internal->ComputeLinkInterfaceLibraries(
+ this, config, iface, head, false, iface.Exists);
}
if(!iface.AllDone)
{
@@ -5951,9 +5957,8 @@ cmTarget::GetLinkInterfaceLibraries(const std::string& config,
{
iface.LibrariesDone = true;
iface.ExplicitLibraries =
- this->ComputeLinkInterfaceLibraries(config, iface, head,
- usage_requirements_only,
- iface.Exists);
+ this->Internal->ComputeLinkInterfaceLibraries(
+ this, config, iface, head, usage_requirements_only, iface.Exists);
}
return iface.Exists? &iface : 0;
@@ -6076,11 +6081,14 @@ void cmTarget::GetTransitivePropertyTargets(const std::string& config,
}
//----------------------------------------------------------------------------
-const char* cmTarget::ComputeLinkInterfaceLibraries(const std::string& config,
- LinkInterface& iface,
- cmTarget const* headTarget,
- bool usage_requirements_only,
- bool &exists) const
+const char*
+cmTargetInternals::ComputeLinkInterfaceLibraries(
+ cmTarget const* thisTarget,
+ const std::string& config,
+ OptionalLinkInterface& iface,
+ cmTarget const* headTarget,
+ bool usage_requirements_only,
+ bool &exists)
{
// Construct the property name suffix for this configuration.
std::string suffix = "_";
@@ -6097,15 +6105,15 @@ const char* cmTarget::ComputeLinkInterfaceLibraries(const std::string& config,
// libraries and executables that export symbols.
const char* explicitLibraries = 0;
std::string linkIfaceProp;
- if(this->PolicyStatusCMP0022 != cmPolicies::OLD &&
- this->PolicyStatusCMP0022 != cmPolicies::WARN)
+ if(thisTarget->PolicyStatusCMP0022 != cmPolicies::OLD &&
+ thisTarget->PolicyStatusCMP0022 != cmPolicies::WARN)
{
// CMP0022 NEW behavior is to use INTERFACE_LINK_LIBRARIES.
linkIfaceProp = "INTERFACE_LINK_LIBRARIES";
- explicitLibraries = this->GetProperty(linkIfaceProp);
+ explicitLibraries = thisTarget->GetProperty(linkIfaceProp);
}
- else if(this->GetType() == cmTarget::SHARED_LIBRARY ||
- this->IsExecutableWithExports())
+ else if(thisTarget->GetType() == cmTarget::SHARED_LIBRARY ||
+ thisTarget->IsExecutableWithExports())
{
// CMP0022 OLD behavior is to use LINK_INTERFACE_LIBRARIES if set on a
// shared lib or executable.
@@ -6113,31 +6121,32 @@ const char* cmTarget::ComputeLinkInterfaceLibraries(const std::string& config,
// Lookup the per-configuration property.
linkIfaceProp = "LINK_INTERFACE_LIBRARIES";
linkIfaceProp += suffix;
- explicitLibraries = this->GetProperty(linkIfaceProp);
+ explicitLibraries = thisTarget->GetProperty(linkIfaceProp);
// If not set, try the generic property.
if(!explicitLibraries)
{
linkIfaceProp = "LINK_INTERFACE_LIBRARIES";
- explicitLibraries = this->GetProperty(linkIfaceProp);
+ explicitLibraries = thisTarget->GetProperty(linkIfaceProp);
}
}
- if(explicitLibraries && this->PolicyStatusCMP0022 == cmPolicies::WARN &&
- !this->Internal->PolicyWarnedCMP0022)
+ if(explicitLibraries &&
+ thisTarget->PolicyStatusCMP0022 == cmPolicies::WARN &&
+ !this->PolicyWarnedCMP0022)
{
// Compare the explicitly set old link interface properties to the
// preferred new link interface property one and warn if different.
const char* newExplicitLibraries =
- this->GetProperty("INTERFACE_LINK_LIBRARIES");
+ thisTarget->GetProperty("INTERFACE_LINK_LIBRARIES");
if (newExplicitLibraries
&& strcmp(newExplicitLibraries, explicitLibraries) != 0)
{
cmOStringStream w;
w <<
- (this->Makefile->GetPolicies()
+ (thisTarget->Makefile->GetPolicies()
->GetPolicyWarning(cmPolicies::CMP0022)) << "\n"
- "Target \"" << this->GetName() << "\" has an "
+ "Target \"" << thisTarget->GetName() << "\" has an "
"INTERFACE_LINK_LIBRARIES property which differs from its " <<
linkIfaceProp << " properties."
"\n"
@@ -6145,16 +6154,16 @@ const char* cmTarget::ComputeLinkInterfaceLibraries(const std::string& config,
" " << newExplicitLibraries << "\n" <<
linkIfaceProp << ":\n"
" " << (explicitLibraries ? explicitLibraries : "(empty)") << "\n";
- this->Makefile->IssueMessage(cmake::AUTHOR_WARNING, w.str());
- this->Internal->PolicyWarnedCMP0022 = true;
+ thisTarget->Makefile->IssueMessage(cmake::AUTHOR_WARNING, w.str());
+ this->PolicyWarnedCMP0022 = true;
}
}
// There is no implicit link interface for executables or modules
// so if none was explicitly set then there is no link interface.
if(!explicitLibraries &&
- (this->GetType() == cmTarget::EXECUTABLE ||
- (this->GetType() == cmTarget::MODULE_LIBRARY)))
+ (thisTarget->GetType() == cmTarget::EXECUTABLE ||
+ (thisTarget->GetType() == cmTarget::MODULE_LIBRARY)))
{
exists = false;
return 0;
@@ -6164,34 +6173,34 @@ const char* cmTarget::ComputeLinkInterfaceLibraries(const std::string& config,
if(explicitLibraries)
{
// The interface libraries have been explicitly set.
- this->ExpandLinkItems(linkIfaceProp, explicitLibraries, config,
- headTarget, usage_requirements_only,
- iface.Libraries);
+ thisTarget->ExpandLinkItems(linkIfaceProp, explicitLibraries, config,
+ headTarget, usage_requirements_only,
+ iface.Libraries);
}
- else if (this->PolicyStatusCMP0022 == cmPolicies::WARN
- || this->PolicyStatusCMP0022 == cmPolicies::OLD)
+ else if (thisTarget->PolicyStatusCMP0022 == cmPolicies::WARN
+ || thisTarget->PolicyStatusCMP0022 == cmPolicies::OLD)
// If CMP0022 is NEW then the plain tll signature sets the
// INTERFACE_LINK_LIBRARIES, so if we get here then the project
// cleared the property explicitly and we should not fall back
// to the link implementation.
{
// The link implementation is the default link interface.
- LinkImplementation const* impl =
- this->GetLinkImplementationLibrariesInternal(config, headTarget);
+ cmTarget::LinkImplementation const* impl =
+ thisTarget->GetLinkImplementationLibrariesInternal(config, headTarget);
std::copy(impl->Libraries.begin(), impl->Libraries.end(),
std::back_inserter(iface.Libraries));
- if(this->PolicyStatusCMP0022 == cmPolicies::WARN &&
- !this->Internal->PolicyWarnedCMP0022 && !usage_requirements_only)
+ if(thisTarget->PolicyStatusCMP0022 == cmPolicies::WARN &&
+ !this->PolicyWarnedCMP0022 && !usage_requirements_only)
{
// Compare the link implementation fallback link interface to the
// preferred new link interface property and warn if different.
std::vector<cmLinkItem> ifaceLibs;
std::string newProp = "INTERFACE_LINK_LIBRARIES";
- if(const char* newExplicitLibraries = this->GetProperty(newProp))
+ if(const char* newExplicitLibraries = thisTarget->GetProperty(newProp))
{
- this->ExpandLinkItems(newProp, newExplicitLibraries, config,
- headTarget, usage_requirements_only,
- ifaceLibs);
+ thisTarget->ExpandLinkItems(newProp, newExplicitLibraries, config,
+ headTarget, usage_requirements_only,
+ ifaceLibs);
}
if (ifaceLibs != iface.Libraries)
{
@@ -6220,9 +6229,9 @@ const char* cmTarget::ComputeLinkInterfaceLibraries(const std::string& config,
cmOStringStream w;
w <<
- (this->Makefile->GetPolicies()
+ (thisTarget->Makefile->GetPolicies()
->GetPolicyWarning(cmPolicies::CMP0022)) << "\n"
- "Target \"" << this->GetName() << "\" has an "
+ "Target \"" << thisTarget->GetName() << "\" has an "
"INTERFACE_LINK_LIBRARIES property. "
"This should be preferred as the source of the link interface "
"for this library but because CMP0022 is not set CMake is "
@@ -6233,8 +6242,8 @@ const char* cmTarget::ComputeLinkInterfaceLibraries(const std::string& config,
" " << newLibraries << "\n"
"Link implementation:\n"
" " << oldLibraries << "\n";
- this->Makefile->IssueMessage(cmake::AUTHOR_WARNING, w.str());
- this->Internal->PolicyWarnedCMP0022 = true;
+ thisTarget->Makefile->IssueMessage(cmake::AUTHOR_WARNING, w.str());
+ this->PolicyWarnedCMP0022 = true;
}
}
}
diff --git a/Source/cmTarget.h b/Source/cmTarget.h
index 39a0667..aa18590 100644
--- a/Source/cmTarget.h
+++ b/Source/cmTarget.h
@@ -771,12 +771,6 @@ private:
GetImportLinkInterface(const std::string& config, cmTarget const* head,
bool usage_requirements_only) const;
- const char* ComputeLinkInterfaceLibraries(const std::string& config,
- LinkInterface& iface,
- cmTarget const* head,
- bool usage_requirements_only,
- bool &exists) const;
-
LinkImplementation const*
GetLinkImplementationLibrariesInternal(const std::string& config,
cmTarget const* head) const;
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=c69e8a5580bd034dcaa1d7d53976200600b26b82
commit c69e8a5580bd034dcaa1d7d53976200600b26b82
Author: Brad King <brad.king at kitware.com>
AuthorDate: Thu Jul 10 16:59:16 2014 -0400
Commit: Brad King <brad.king at kitware.com>
CommitDate: Mon Jul 14 09:51:51 2014 -0400
cmTarget: Refactor internal LinkInterface map
Create the map entry up front and store in it boolean values indicating
which pieces of the LinkInterface structure have been populated.
This approach leads to shorter code that is easier to follow too.
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index d1938d1..3361a81 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -112,9 +112,11 @@ public:
struct OptionalLinkInterface: public cmTarget::LinkInterface
{
OptionalLinkInterface():
- Exists(false), Complete(false), ExplicitLibraries(0) {}
+ LibrariesDone(false), AllDone(false),
+ Exists(false), ExplicitLibraries(0) {}
+ bool LibrariesDone;
+ bool AllDone;
bool Exists;
- bool Complete;
const char* ExplicitLibraries;
};
void ComputeLinkInterface(cmTarget const* thisTarget,
@@ -5895,32 +5897,26 @@ cmTarget::LinkInterface const* cmTarget::GetLinkInterface(
// Lookup any existing link interface for this configuration.
TargetConfigPair key(head, cmSystemTools::UpperCase(config));
- cmTargetInternals::LinkInterfaceMapType::iterator
- i = this->Internal->LinkInterfaceMap.find(key);
- if(i == this->Internal->LinkInterfaceMap.end())
+ cmTargetInternals::OptionalLinkInterface&
+ iface = this->Internal->LinkInterfaceMap[key];
+ if(!iface.LibrariesDone)
{
- // Compute the link interface for this configuration.
- cmTargetInternals::OptionalLinkInterface iface;
+ iface.LibrariesDone = true;
iface.ExplicitLibraries =
this->ComputeLinkInterfaceLibraries(config, iface, head, false,
iface.Exists);
- if (iface.Exists)
+ }
+ if(!iface.AllDone)
+ {
+ iface.AllDone = true;
+ if(iface.Exists)
{
this->Internal->ComputeLinkInterface(this, config, iface,
head, iface.ExplicitLibraries);
}
-
- // Store the information for this configuration.
- cmTargetInternals::LinkInterfaceMapType::value_type entry(key, iface);
- i = this->Internal->LinkInterfaceMap.insert(entry).first;
- }
- else if(!i->second.Complete && i->second.Exists)
- {
- this->Internal->ComputeLinkInterface(this, config, i->second, head,
- i->second.ExplicitLibraries);
}
- return i->second.Exists ? &i->second : 0;
+ return iface.Exists? &iface : 0;
}
//----------------------------------------------------------------------------
@@ -5950,22 +5946,17 @@ cmTarget::GetLinkInterfaceLibraries(const std::string& config,
this->Internal->LinkInterfaceUsageRequirementsOnlyMap :
this->Internal->LinkInterfaceMap);
- cmTargetInternals::LinkInterfaceMapType::iterator i = lim.find(key);
- if(i == lim.end())
+ cmTargetInternals::OptionalLinkInterface& iface = lim[key];
+ if(!iface.LibrariesDone)
{
- // Compute the link interface for this configuration.
- cmTargetInternals::OptionalLinkInterface iface;
+ iface.LibrariesDone = true;
iface.ExplicitLibraries =
this->ComputeLinkInterfaceLibraries(config, iface, head,
usage_requirements_only,
iface.Exists);
-
- // Store the information for this configuration.
- cmTargetInternals::LinkInterfaceMapType::value_type entry(key, iface);
- i = lim.insert(entry).first;
}
- return i->second.Exists ? &i->second : 0;
+ return iface.Exists? &iface : 0;
}
//----------------------------------------------------------------------------
@@ -6348,7 +6339,6 @@ void cmTargetInternals::ComputeLinkInterface(cmTarget const* thisTarget,
sscanf(reps, "%u", &iface.Multiplicity);
}
}
- iface.Complete = true;
}
//----------------------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4db3990e9f3c11add85cba339b7a976f6f0fd3c5
commit 4db3990e9f3c11add85cba339b7a976f6f0fd3c5
Author: Brad King <brad.king at kitware.com>
AuthorDate: Thu Jul 10 16:12:05 2014 -0400
Commit: Brad King <brad.king at kitware.com>
CommitDate: Mon Jul 14 09:46:53 2014 -0400
cmTarget: Drop 'head' argument from processSources
No call sites need it to be anything but 'this'.
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 5865c61..d1938d1 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -624,7 +624,6 @@ static bool processSources(cmTarget const* tgt,
std::vector<std::string> &srcs,
std::set<std::string> &uniqueSrcs,
cmGeneratorExpressionDAGChecker *dagChecker,
- cmTarget const* head,
std::string const& config, bool debugSources)
{
cmMakefile *mf = tgt->GetMakefile();
@@ -641,7 +640,7 @@ static bool processSources(cmTarget const* tgt,
cmSystemTools::ExpandListArgument((*it)->ge->Evaluate(mf,
config,
false,
- head ? head : tgt,
+ tgt,
tgt,
dagChecker),
entrySources);
@@ -771,7 +770,6 @@ void cmTarget::GetSourceFiles(std::vector<std::string> &files,
files,
uniqueSrcs,
&dagChecker,
- this,
config,
debugSources);
@@ -788,7 +786,6 @@ void cmTarget::GetSourceFiles(std::vector<std::string> &files,
files,
uniqueSrcs,
&dagChecker,
- this,
config,
debugSources);
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4b8130b8de223674d567bdff5e156b1bdc1d5c27
commit 4b8130b8de223674d567bdff5e156b1bdc1d5c27
Author: Brad King <brad.king at kitware.com>
AuthorDate: Thu Jul 10 16:07:31 2014 -0400
Commit: Brad King <brad.king at kitware.com>
CommitDate: Mon Jul 14 09:46:53 2014 -0400
cmTarget: Drop 'head' argument from GetSourceFiles
No call sites need it to be anything but 'this'.
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index e1ce4dd..5865c61 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -158,8 +158,8 @@ public:
typedef std::map<std::string, cmTarget::LinkClosure> LinkClosureMapType;
LinkClosureMapType LinkClosureMap;
- typedef std::map<TargetConfigPair, std::vector<cmSourceFile*> >
- SourceFilesMapType;
+ typedef std::map<std::string, std::vector<cmSourceFile*> >
+ SourceFilesMapType;
SourceFilesMapType SourceFilesMap;
std::set<cmLinkItem> UtilityItems;
@@ -707,8 +707,7 @@ static bool processSources(cmTarget const* tgt,
//----------------------------------------------------------------------------
void cmTarget::GetSourceFiles(std::vector<std::string> &files,
- const std::string& config,
- cmTarget const* head) const
+ const std::string& config) const
{
assert(this->GetType() != INTERFACE_LIBRARY);
@@ -772,7 +771,7 @@ void cmTarget::GetSourceFiles(std::vector<std::string> &files,
files,
uniqueSrcs,
&dagChecker,
- head,
+ this,
config,
debugSources);
@@ -789,7 +788,7 @@ void cmTarget::GetSourceFiles(std::vector<std::string> &files,
files,
uniqueSrcs,
&dagChecker,
- head,
+ this,
config,
debugSources);
@@ -868,12 +867,11 @@ cmTarget::GetConfigCommonSourceFiles(std::vector<cmSourceFile*>& files) const
//----------------------------------------------------------------------------
void cmTarget::GetSourceFiles(std::vector<cmSourceFile*> &files,
- const std::string& config,
- cmTarget const* head) const
+ const std::string& config) const
{
// Lookup any existing link implementation for this configuration.
- TargetConfigPair key(head, cmSystemTools::UpperCase(config));
+ std::string key = cmSystemTools::UpperCase(config);
if(!this->LinkImplementationLanguageIsContextDependent)
{
@@ -890,7 +888,7 @@ void cmTarget::GetSourceFiles(std::vector<cmSourceFile*> &files,
else
{
std::vector<std::string> srcs;
- this->GetSourceFiles(srcs, config, head);
+ this->GetSourceFiles(srcs, config);
std::set<cmSourceFile*> emitted;
@@ -5422,7 +5420,7 @@ void cmTarget::GetLanguages(std::set<std::string>& languages,
const std::string& config) const
{
std::vector<cmSourceFile*> sourceFiles;
- this->GetSourceFiles(sourceFiles, config, this);
+ this->GetSourceFiles(sourceFiles, config);
for(std::vector<cmSourceFile*>::const_iterator
i = sourceFiles.begin(); i != sourceFiles.end(); ++i)
{
diff --git a/Source/cmTarget.h b/Source/cmTarget.h
index d5fb5e8..39a0667 100644
--- a/Source/cmTarget.h
+++ b/Source/cmTarget.h
@@ -161,8 +161,7 @@ public:
* Get the list of the source files used by this target
*/
void GetSourceFiles(std::vector<cmSourceFile*> &files,
- const std::string& config,
- cmTarget const* head = 0) const;
+ const std::string& config) const;
bool GetConfigCommonSourceFiles(std::vector<cmSourceFile*>& files) const;
/**
@@ -711,8 +710,7 @@ private:
bool contentOnly) const;
void GetSourceFiles(std::vector<std::string> &files,
- const std::string& config,
- cmTarget const* head = 0) const;
+ const std::string& config) const;
private:
std::string Name;
std::vector<cmCustomCommand> PreBuildCommands;
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=4c763dd1f1c922606660e275372cc6313ac42535
commit 4c763dd1f1c922606660e275372cc6313ac42535
Author: Brad King <brad.king at kitware.com>
AuthorDate: Thu Jul 10 16:06:36 2014 -0400
Commit: Brad King <brad.king at kitware.com>
CommitDate: Mon Jul 14 09:46:53 2014 -0400
cmTarget: Drop 'head' argument from GetLanguages
No call sites need it to be anything but 'this'.
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index d74c66b..e1ce4dd 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -5419,11 +5419,10 @@ cmTarget::GetObjectLibrariesCMP0026(std::vector<cmTarget*>& objlibs) const
//----------------------------------------------------------------------------
void cmTarget::GetLanguages(std::set<std::string>& languages,
- const std::string& config,
- cmTarget const* head) const
+ const std::string& config) const
{
std::vector<cmSourceFile*> sourceFiles;
- this->GetSourceFiles(sourceFiles, config, head);
+ this->GetSourceFiles(sourceFiles, config, this);
for(std::vector<cmSourceFile*>::const_iterator
i = sourceFiles.begin(); i != sourceFiles.end(); ++i)
{
@@ -5459,7 +5458,7 @@ void cmTarget::GetLanguages(std::set<std::string>& languages,
for(std::vector<cmTarget*>::const_iterator
i = objectLibraries.begin(); i != objectLibraries.end(); ++i)
{
- (*i)->GetLanguages(languages, config, head);
+ (*i)->GetLanguages(languages, config);
}
}
@@ -6551,7 +6550,7 @@ cmTarget::ComputeLinkImplementationLanguages(const std::string& config,
// This target needs runtime libraries for its source languages.
std::set<std::string> languages;
// Get languages used in our source files.
- this->GetLanguages(languages, config, this);
+ this->GetLanguages(languages, config);
// Copy the set of langauges to the link implementation.
for(std::set<std::string>::iterator li = languages.begin();
li != languages.end(); ++li)
diff --git a/Source/cmTarget.h b/Source/cmTarget.h
index 908e4ba..d5fb5e8 100644
--- a/Source/cmTarget.h
+++ b/Source/cmTarget.h
@@ -491,8 +491,7 @@ public:
// information to forward these property changes to the targets
// until we have per-target object file properties.
void GetLanguages(std::set<std::string>& languages,
- std::string const& config,
- cmTarget const* head = 0) const;
+ std::string const& config) const;
/** Return whether this target is an executable with symbol exports
enabled. */
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=190cabe7c1641482529bba34d46a38e4e33a2384
commit 190cabe7c1641482529bba34d46a38e4e33a2384
Author: Brad King <brad.king at kitware.com>
AuthorDate: Thu Jul 10 16:02:46 2014 -0400
Commit: Brad King <brad.king at kitware.com>
CommitDate: Mon Jul 14 09:46:53 2014 -0400
cmTarget: Drop 'head' argument from ComputeLinkImplementationLanguages
No call sites need it to be anything but 'this'.
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index a740bc3..d74c66b 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -6405,7 +6405,7 @@ cmTarget::GetLinkImplementation(const std::string& config) const
if(!impl.LanguagesDone)
{
impl.LanguagesDone = true;
- this->ComputeLinkImplementationLanguages(config, impl, this);
+ this->ComputeLinkImplementationLanguages(config, impl);
}
return &impl;
}
@@ -6546,13 +6546,12 @@ void cmTarget::ComputeLinkImplementation(const std::string& config,
//----------------------------------------------------------------------------
void
cmTarget::ComputeLinkImplementationLanguages(const std::string& config,
- LinkImplementation& impl,
- cmTarget const* head) const
+ LinkImplementation& impl) const
{
// This target needs runtime libraries for its source languages.
std::set<std::string> languages;
// Get languages used in our source files.
- this->GetLanguages(languages, config, head);
+ this->GetLanguages(languages, config, this);
// Copy the set of langauges to the link implementation.
for(std::set<std::string>::iterator li = languages.begin();
li != languages.end(); ++li)
diff --git a/Source/cmTarget.h b/Source/cmTarget.h
index dc67f1e..908e4ba 100644
--- a/Source/cmTarget.h
+++ b/Source/cmTarget.h
@@ -787,8 +787,7 @@ private:
LinkImplementation& impl,
cmTarget const* head) const;
void ComputeLinkImplementationLanguages(const std::string& config,
- LinkImplementation& impl,
- cmTarget const* head) const;
+ LinkImplementation& impl) const;
void ComputeLinkClosure(const std::string& config, LinkClosure& lc) const;
void ExpandLinkItems(std::string const& prop, std::string const& value,
-----------------------------------------------------------------------
Summary of changes:
Source/cmTarget.cxx | 192 +++++++++++++++++++++++----------------------------
Source/cmTarget.h | 18 ++---
2 files changed, 92 insertions(+), 118 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list