Merge topic 'try_compile-shorter-names'

f3e9eeed try_compile: Use shorter test executable name with consistent length
This commit is contained in:
Brad King 2015-02-11 09:59:20 -05:00 committed by CMake Topic Stage
commit 0e6af85263
1 changed files with 2 additions and 2 deletions

View File

@ -383,8 +383,8 @@ int cmCoreTryCompile::TryCompileCode(std::vector<std::string> 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())