1
0
mirror of https://github.com/Kitware/CMake.git synced 2025-10-19 02:17:27 +08:00

cmGlobalGenerator: fix off-by-one for && command joining

Only add `&&` if there is another command after the current one.
This commit is contained in:
Ben Boeckel
2023-05-16 12:14:58 -04:00
parent c715fd8d76
commit b017c9f127

View File

@@ -2181,7 +2181,7 @@ int cmGlobalGenerator::Build(
command != makeCommand.end() && retVal == 0; ++command) {
makeCommandStr = command->Printable();
outputMakeCommandStr = command->QuotedPrintable();
if (command != makeCommand.end()) {
if ((command + 1) != makeCommand.end()) {
makeCommandStr += " && ";
outputMakeCommandStr += " && ";
}