diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index ac2000b6cf..2bfe0a200c 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -116,7 +116,7 @@ void cmTarget::TraceVSDependencies(std::string projFile, ic != this->GetPostBuildCommands().end(); ++ic) { cmCustomCommand &c = *ic; - for (std::vector::iterator i = c.GetDepends().begin(); + for (std::vector::const_iterator i = c.GetDepends().begin(); i != c.GetDepends().end(); ++i) { srcFilesToProcess.push(*i);