diff options
author | Stephen Kelly <steveire@gmail.com> | 2014-03-27 16:06:34 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2014-04-02 21:14:02 (GMT) |
commit | df753df94bb1e995372baabb0240585560c72ded (patch) | |
tree | 0dfeb552caccda9df68ec32e4f308fada323736f /Source/cmGeneratorTarget.cxx | |
parent | 869328aac31f8e702ac7039ce72c6fa485432733 (diff) | |
download | CMake-df753df94bb1e995372baabb0240585560c72ded.zip CMake-df753df94bb1e995372baabb0240585560c72ded.tar.gz CMake-df753df94bb1e995372baabb0240585560c72ded.tar.bz2 |
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.
Diffstat (limited to 'Source/cmGeneratorTarget.cxx')
-rw-r--r-- | Source/cmGeneratorTarget.cxx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/Source/cmGeneratorTarget.cxx b/Source/cmGeneratorTarget.cxx index 321dd42..8688f78 100644 --- a/Source/cmGeneratorTarget.cxx +++ b/Source/cmGeneratorTarget.cxx @@ -619,7 +619,11 @@ cmTargetTraceDependencies for(std::vector<std::string>::const_iterator si = sources.begin(); si != sources.end(); ++si) { - this->QueueSource(*si); + if(this->SourcesQueued.insert(*si).second) + { + this->SourceQueue.push(*si); + this->Makefile->GetOrCreateSource(*si); + } } } |