diff --git a/Source/cmSourceFilesCommand.cxx b/Source/cmSourceFilesCommand.cxx index 53d46021b9..003bc2f7da 100644 --- a/Source/cmSourceFilesCommand.cxx +++ b/Source/cmSourceFilesCommand.cxx @@ -71,7 +71,7 @@ bool cmSourceFilesCommand::InitialPass(std::vector const& args) } else { - file.SetName(i->c_str(), m_Makefile->GetCurrentDirectory(), + file.SetName(copy.c_str(), m_Makefile->GetCurrentDirectory(), m_Makefile->GetSourceExtensions(), m_Makefile->GetHeaderExtensions()); }