ENH: do not use crazy long paths to object files for try compile
This commit is contained in:
parent
22767f7e3f
commit
8013ffd23b
@ -2286,6 +2286,16 @@ cmLocalGenerator::GetObjectFileNameWithoutTarget(const cmSourceFile& source)
|
|||||||
objectName = relFromSource;
|
objectName = relFromSource;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// if it is still a full path check for the try compile case
|
||||||
|
// try compile never have in source sources, and should not
|
||||||
|
// have conflicting source file names in the same target
|
||||||
|
if(cmSystemTools::FileIsFullPath(objectName.c_str()))
|
||||||
|
{
|
||||||
|
if(this->GetGlobalGenerator()->GetCMakeInstance()->GetIsInTryCompile())
|
||||||
|
{
|
||||||
|
objectName = cmSystemTools::GetFilenameName(source.GetFullPath());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Replace the original source file extension with the object file
|
// Replace the original source file extension with the object file
|
||||||
// extension.
|
// extension.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user