diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx index eebe674c95..df251ce80d 100644 --- a/Source/cmFileCommand.cxx +++ b/Source/cmFileCommand.cxx @@ -875,9 +875,7 @@ bool HandleMakeDirectoryCommand(std::vector const& args, } std::string expr; - for (std::string const& arg : - cmMakeRange(args).advance(1)) // Get rid of subcommand - { + for (std::string const& arg : argsRange) { std::string const* cdir = &arg; if (!cmsys::SystemTools::FileIsFullPath(arg)) { expr =