diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 396715db32..3425f34ad5 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -1671,6 +1671,7 @@ void cmTarget::SetProperty(const std::string& prop, const char* value) this->Internal->SourceFilesMap.clear(); cmListFileBacktrace lfbt = this->Makefile->GetBacktrace(); cmGeneratorExpression ge(lfbt); + cmDeleteAll(this->Internal->SourceEntries); this->Internal->SourceEntries.clear(); cmsys::auto_ptr cge = ge.Parse(value); this->Internal->SourceEntries.push_back(