mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-07 06:09:52 -06:00
cmTarget: Fix memory leak when SOURCES property is cleared
This commit is contained in:
@@ -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<cmCompiledGeneratorExpression> cge = ge.Parse(value);
|
||||
this->Internal->SourceEntries.push_back(
|
||||
|
||||
Reference in New Issue
Block a user