1
0
mirror of https://github.com/Kitware/CMake.git synced 2025-10-15 03:48:02 +08:00

file(MAKE_DIRECTORY): Do not make directories for command keywords

In commit 95323c90a1 (file(MAKE_DIRECTORY): Add optional RESULT keyword
to capture failure., 2024-06-16, v3.31.0-rc1~414^2) we computed an
updated range of arguments, that name directories to be created, before
the `RESULT` keyword.  However, we forgot to use it in the loop.

Fixes: #26768
This commit is contained in:
Brad King
2025-03-13 11:44:48 -04:00
parent 310cf73195
commit 397ec37528

View File

@@ -875,9 +875,7 @@ bool HandleMakeDirectoryCommand(std::vector<std::string> 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 =