diff --git a/Source/cmAddTestCommand.cxx b/Source/cmAddTestCommand.cxx index 187a3adcc..0c118510e 100644 --- a/Source/cmAddTestCommand.cxx +++ b/Source/cmAddTestCommand.cxx @@ -36,7 +36,11 @@ bool cmAddTestCommand::InitialPass(std::vector const& args) // also expand any CMake variables std::vector arguments; - arguments.assign(args.begin() + 2, args.end()); + std::vector::const_iterator it; + for ( it = args.begin() + 2; it != args.end(); ++ it ) + { + arguments.push_back(*it); + } cmTest* test = m_Makefile->CreateTest(args[0].c_str()); test->SetCommand(args[1].c_str());