summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-10-07 22:49:38 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-10-12 16:39:58 (GMT)
commitc7645fca12870cef732f26730588cda3be072852 (patch)
treef7e28965906f7471794d9d717dc2d299b8cc8912
parentce8894aaf07871dbc58039e0ff0f22efaee7c014 (diff)
downloadCMake-c7645fca12870cef732f26730588cda3be072852.zip
CMake-c7645fca12870cef732f26730588cda3be072852.tar.gz
CMake-c7645fca12870cef732f26730588cda3be072852.tar.bz2
cmComputeLinkInformation: Port data interface to cmGeneratorTarget.
-rw-r--r--Source/cmCommonTargetGenerator.cxx12
-rw-r--r--Source/cmComputeLinkInformation.cxx6
-rw-r--r--Source/cmComputeLinkInformation.h4
-rw-r--r--Source/cmExportFileGenerator.cxx13
-rw-r--r--Source/cmGeneratorTarget.cxx4
5 files changed, 19 insertions, 20 deletions
diff --git a/Source/cmCommonTargetGenerator.cxx b/Source/cmCommonTargetGenerator.cxx
index 252e231..b9ed345 100644
--- a/Source/cmCommonTargetGenerator.cxx
+++ b/Source/cmCommonTargetGenerator.cxx
@@ -391,21 +391,19 @@ cmCommonTargetGenerator::GetLinkedTargetDirectories() const
for(cmComputeLinkInformation::ItemVector::const_iterator
i = items.begin(); i != items.end(); ++i)
{
- cmTarget const* linkee = i->Target;
+ cmGeneratorTarget const* linkee = i->Target;
if(linkee && !linkee->IsImported()
// We can ignore the INTERFACE_LIBRARY items because
// Target->GetLinkInformation already processed their
// link interface and they don't have any output themselves.
&& linkee->GetType() != cmTarget::INTERFACE_LIBRARY
- && emitted.insert(linkee).second)
+ && emitted.insert(linkee->Target).second)
{
- cmGeneratorTarget* gt =
- this->GlobalGenerator->GetGeneratorTarget(linkee);
- cmLocalGenerator* lg = gt->GetLocalGenerator();
- cmMakefile* mf = linkee->GetMakefile();
+ cmLocalGenerator* lg = linkee->GetLocalGenerator();
+ cmMakefile* mf = linkee->Target->GetMakefile();
std::string di = mf->GetCurrentBinaryDirectory();
di += "/";
- di += lg->GetTargetDirectory(*linkee);
+ di += lg->GetTargetDirectory(*linkee->Target);
dirs.push_back(di);
}
}
diff --git a/Source/cmComputeLinkInformation.cxx b/Source/cmComputeLinkInformation.cxx
index 577e327..f7409f5 100644
--- a/Source/cmComputeLinkInformation.cxx
+++ b/Source/cmComputeLinkInformation.cxx
@@ -658,7 +658,7 @@ void cmComputeLinkInformation::AddItem(std::string const& item,
std::string exe = tgt->GetFullPath(config, this->UseImportLibrary,
true);
linkItem += exe;
- this->Items.push_back(Item(linkItem, true, tgt->Target));
+ this->Items.push_back(Item(linkItem, true, tgt));
this->Depends.push_back(exe);
}
else if(tgt->GetType() == cmTarget::INTERFACE_LIBRARY)
@@ -666,7 +666,7 @@ void cmComputeLinkInformation::AddItem(std::string const& item,
// Add the interface library as an item so it can be considered as part
// of COMPATIBLE_INTERFACE_ enforcement. The generators will ignore
// this for the actual link line.
- this->Items.push_back(Item(std::string(), true, tgt->Target));
+ this->Items.push_back(Item(std::string(), true, tgt));
}
else
{
@@ -1120,7 +1120,7 @@ void cmComputeLinkInformation::AddTargetItem(std::string const& item,
}
// Now add the full path to the library.
- this->Items.push_back(Item(item, true, target->Target));
+ this->Items.push_back(Item(item, true, target));
}
//----------------------------------------------------------------------------
diff --git a/Source/cmComputeLinkInformation.h b/Source/cmComputeLinkInformation.h
index 94c364d..2aac1bc 100644
--- a/Source/cmComputeLinkInformation.h
+++ b/Source/cmComputeLinkInformation.h
@@ -39,11 +39,11 @@ public:
Item(): Value(), IsPath(true), Target(0) {}
Item(Item const& item):
Value(item.Value), IsPath(item.IsPath), Target(item.Target) {}
- Item(std::string const& v, bool p, cmTarget const* target = 0):
+ Item(std::string const& v, bool p, cmGeneratorTarget const* target = 0):
Value(v), IsPath(p), Target(target) {}
std::string Value;
bool IsPath;
- cmTarget const* Target;
+ cmGeneratorTarget const* Target;
};
typedef std::vector<Item> ItemVector;
ItemVector const& GetItems();
diff --git a/Source/cmExportFileGenerator.cxx b/Source/cmExportFileGenerator.cxx
index 5d530a0..b29429e 100644
--- a/Source/cmExportFileGenerator.cxx
+++ b/Source/cmExportFileGenerator.cxx
@@ -517,8 +517,9 @@ void cmExportFileGenerator::PopulateInterfaceProperty(
//----------------------------------------------------------------------------
-void getPropertyContents(cmTarget const* tgt, const std::string& prop,
- std::set<std::string> &ifaceProperties)
+void getPropertyContents(cmGeneratorTarget const* tgt,
+ const std::string& prop,
+ std::set<std::string> &ifaceProperties)
{
const char *p = tgt->GetProperty(prop);
if (!p)
@@ -589,11 +590,11 @@ void cmExportFileGenerator::PopulateCompatibleInterfaceProperties(
std::set<std::string> ifaceProperties;
- getPropertyContents(target, "COMPATIBLE_INTERFACE_BOOL", ifaceProperties);
- getPropertyContents(target, "COMPATIBLE_INTERFACE_STRING", ifaceProperties);
- getPropertyContents(target, "COMPATIBLE_INTERFACE_NUMBER_MIN",
+ getPropertyContents(gtarget, "COMPATIBLE_INTERFACE_BOOL", ifaceProperties);
+ getPropertyContents(gtarget, "COMPATIBLE_INTERFACE_STRING", ifaceProperties);
+ getPropertyContents(gtarget, "COMPATIBLE_INTERFACE_NUMBER_MIN",
ifaceProperties);
- getPropertyContents(target, "COMPATIBLE_INTERFACE_NUMBER_MAX",
+ getPropertyContents(gtarget, "COMPATIBLE_INTERFACE_NUMBER_MAX",
ifaceProperties);
if (target->GetType() != cmTarget::INTERFACE_LIBRARY)
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx
index f3d34e3..96bacdf 100644
--- a/Source/cmGeneratorTarget.cxx
+++ b/Source/cmGeneratorTarget.cxx
@@ -3735,7 +3735,7 @@ const char * getLinkInterfaceDependentProperty(cmGeneratorTarget const* tgt,
//----------------------------------------------------------------------------
template<typename PropertyType>
void checkPropertyConsistency(cmGeneratorTarget const* depender,
- cmTarget const* dependee,
+ cmGeneratorTarget const* dependee,
const std::string& propName,
std::set<std::string> &emitted,
const std::string& config,
@@ -3751,7 +3751,7 @@ void checkPropertyConsistency(cmGeneratorTarget const* depender,
std::vector<std::string> props;
cmSystemTools::ExpandListArgument(prop, props);
std::string pdir =
- dependee->GetMakefile()->GetRequiredDefinition("CMAKE_ROOT");
+ dependee->Target->GetMakefile()->GetRequiredDefinition("CMAKE_ROOT");
pdir += "/Help/prop_tgt/";
for(std::vector<std::string>::iterator pi = props.begin();