mirror of
https://github.com/reactos/CMake.git
synced 2024-11-28 14:01:21 +00:00
cmGeneratorTarget: Don't add computed sources to the target.
When config-specifig generator expressions are supported, a target may have SOURCES: src1.cpp $<$<CONFIG:Debug>:src2.cpp> $<$<CONFIG:Release>:src3.cpp> and computation in cmTargetTraceDependencies would add each of the src2.cpp and src3.cpp sources back to the target without a config-guard. That would make the sources be used later when generating the buildsystem, regardless of the configuration. Avoid calling AddSource on the target with the result of the GetSourceFiles call.
This commit is contained in:
parent
869328aac3
commit
df753df94b
@ -619,7 +619,11 @@ cmTargetTraceDependencies
|
|||||||
for(std::vector<std::string>::const_iterator si = sources.begin();
|
for(std::vector<std::string>::const_iterator si = sources.begin();
|
||||||
si != sources.end(); ++si)
|
si != sources.end(); ++si)
|
||||||
{
|
{
|
||||||
this->QueueSource(*si);
|
if(this->SourcesQueued.insert(*si).second)
|
||||||
|
{
|
||||||
|
this->SourceQueue.push(*si);
|
||||||
|
this->Makefile->GetOrCreateSource(*si);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user