Merge topic 'INTERFACE-no-sources'

9db9c1fc cmTarget: Don't try to get sources of an INTERFACE_LIBRARY.
This commit is contained in:
Brad King 2014-02-17 09:59:49 -05:00 committed by CMake Topic Stage
commit 10623032c7
3 changed files with 10 additions and 5 deletions

View File

@ -498,11 +498,14 @@ cmTargetTraceDependencies
// Queue all the source files already specified for the target.
std::vector<cmSourceFile*> sources;
this->Target->GetSourceFiles(sources);
for(std::vector<cmSourceFile*>::const_iterator si = sources.begin();
si != sources.end(); ++si)
if (this->Target->GetType() != cmTarget::INTERFACE_LIBRARY)
{
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.

View File

@ -1468,7 +1468,8 @@ void cmGlobalGenerator::ComputeGeneratorTargetObjects()
for(cmGeneratorTargetsType::iterator ti = targets.begin();
ti != targets.end(); ++ti)
{
if (ti->second->Target->IsImported())
if (ti->second->Target->IsImported()
|| ti->second->Target->GetType() == cmTarget::INTERFACE_LIBRARY)
{
continue;
}

View File

@ -551,6 +551,7 @@ bool cmTarget::FindSourceFiles()
//----------------------------------------------------------------------------
void cmTarget::GetSourceFiles(std::vector<cmSourceFile*> &files) const
{
assert(this->GetType() != INTERFACE_LIBRARY);
files = this->SourceFiles;
}