FASTBuild: fix possible collision in exec's name

I was lucky enough to hit a hash collision
in the first 7 hex digits (28 bits) of SHA256 :)
This commit is contained in:
Eduard Voronkin
2025-09-18 18:20:50 -07:00
parent 2fdae375ec
commit 4b74d6c5b7

View File

@@ -155,7 +155,7 @@ std::string cmFastbuildTargetGenerator::GetCustomCommandTargetName(
extras += std::to_string(static_cast<int>(step));
cmCryptoHash hash(cmCryptoHash::AlgoSHA256);
targetName += "-" + hash.HashString(extras).substr(0, 7);
targetName += "-" + hash.HashString(extras).substr(0, 14);
return targetName;
}