Skip to content
Snippets Groups Projects
Commit 3c066fb8 authored by Matthew Woehlke's avatar Matthew Woehlke
Browse files

try_compile: Use <resultvar> in scratch directory

Tweak the name of the scratch directory created by try_compile to
include the name of the variable receiving the compile result. This
should make it easier to find the result of a particular try_compile
when using --debug-trycompile.
parent cadcb6a5
Branches master
No related tags found
No related merge requests found
......@@ -447,7 +447,8 @@ bool cmCoreTryCompile::TryCompileCode(Arguments& arguments,
if (useUniqueBinaryDirectory) {
this->BinaryDirectory =
cmStrCat(this->Makefile->GetHomeOutputDirectory(),
"/CMakeFiles/CMakeScratch/TryCompile-XXXXXX");
"/CMakeFiles/CMakeScratch/TryCompile-",
*arguments.CompileResultVariable, "-XXXXXX");
cmSystemTools::MakeTempDirectory(this->BinaryDirectory);
} else {
cmSystemTools::MakeDirectory(this->BinaryDirectory);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment