mirror of
https://github.com/reactos/CMake.git
synced 2024-11-28 14:01:21 +00:00
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.
|
||||
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.
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -551,6 +551,7 @@ bool cmTarget::FindSourceFiles()
|
||||
//----------------------------------------------------------------------------
|
||||
void cmTarget::GetSourceFiles(std::vector<cmSourceFile*> &files) const
|
||||
{
|
||||
assert(this->GetType() != INTERFACE_LIBRARY);
|
||||
files = this->SourceFiles;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user