cmTarget: Don't try to get sources of an INTERFACE_LIBRARY.
An an assert to ensure this.
This commit is contained in:
parent
79bb8cfcf3
commit
9db9c1fc8b
@ -498,11 +498,14 @@ cmTargetTraceDependencies
|
|||||||
|
|
||||||
// Queue all the source files already specified for the target.
|
// Queue all the source files already specified for the target.
|
||||||
std::vector<cmSourceFile*> sources;
|
std::vector<cmSourceFile*> sources;
|
||||||
this->Target->GetSourceFiles(sources);
|
if (this->Target->GetType() != cmTarget::INTERFACE_LIBRARY)
|
||||||
for(std::vector<cmSourceFile*>::const_iterator si = sources.begin();
|
|
||||||
si != sources.end(); ++si)
|
|
||||||
{
|
{
|
||||||
this->QueueSource(*si);
|
this->Target->GetSourceFiles(sources);
|
||||||
|
for(std::vector<cmSourceFile*>::const_iterator si = sources.begin();
|
||||||
|
si != sources.end(); ++si)
|
||||||
|
{
|
||||||
|
this->QueueSource(*si);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Queue pre-build, pre-link, and post-build rule dependencies.
|
// Queue pre-build, pre-link, and post-build rule dependencies.
|
||||||
|
@ -1468,7 +1468,8 @@ void cmGlobalGenerator::ComputeGeneratorTargetObjects()
|
|||||||
for(cmGeneratorTargetsType::iterator ti = targets.begin();
|
for(cmGeneratorTargetsType::iterator ti = targets.begin();
|
||||||
ti != targets.end(); ++ti)
|
ti != targets.end(); ++ti)
|
||||||
{
|
{
|
||||||
if (ti->second->Target->IsImported())
|
if (ti->second->Target->IsImported()
|
||||||
|
|| ti->second->Target->GetType() == cmTarget::INTERFACE_LIBRARY)
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -551,6 +551,7 @@ bool cmTarget::FindSourceFiles()
|
|||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
void cmTarget::GetSourceFiles(std::vector<cmSourceFile*> &files) const
|
void cmTarget::GetSourceFiles(std::vector<cmSourceFile*> &files) const
|
||||||
{
|
{
|
||||||
|
assert(this->GetType() != INTERFACE_LIBRARY);
|
||||||
files = this->SourceFiles;
|
files = this->SourceFiles;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user