diff --git a/Source/cmCoreTryCompile.cxx b/Source/cmCoreTryCompile.cxx index c4145536e..d9369e6e7 100644 --- a/Source/cmCoreTryCompile.cxx +++ b/Source/cmCoreTryCompile.cxx @@ -383,8 +383,8 @@ int cmCoreTryCompile::TryCompileCode(std::vector const& argv) /* Use a random file name to avoid rapid creation and deletion of the same executable name (some filesystems fail on that). */ - sprintf(targetNameBuf, "cmTryCompileExec%u", - cmSystemTools::RandomSeed()); + sprintf(targetNameBuf, "cmTC_%05x", + cmSystemTools::RandomSeed() & 0xFFFFF); targetName = targetNameBuf; if (!targets.empty())