Commit c66f03ad authored by Michael Wild's avatar Michael Wild Committed by Brad King

cmDepends: No dependency-vector erasure in CheckDependencies

Some dependency-generators (such as cmDependsFortran) generate multiple
entries per depender, so erasing the dependency vector for each depender
found loses earlier dependencies.
Signed-off-by: default avatarMichael Wild <>
parent e74ff7c2
......@@ -181,8 +181,10 @@ bool cmDepends::CheckDependencies(std::istream& internalDepends,
// kdelibs/khtml this reduces the number of calls from 184k down to 92k,
// or the time for cmake -E cmake_depends from 0.3 s down to 0.21 s.
dependerExists = cmSystemTools::FileExists(this->Depender);
DependencyVector tmp;
validDeps[this->Depender] = tmp;
// If we erase validDeps[this->Depender] by overwriting it with an empty
// vector, we lose dependencies for dependers that have multiple
// entries. No need to initialize the entry, std::map will do so on first
// access.
currentDependencies = &validDeps[this->Depender];
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment