summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2007-01-31 21:49:25 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2007-01-31 21:49:25 (GMT)
commit8013ffd23b329fbc4ce66c9c8e04e51e98fca392 (patch)
tree82248466af82635390d37958de1efda060310452 /Source
parent22767f7e3f8933feec1a017529519fceeb67233b (diff)
downloadCMake-8013ffd23b329fbc4ce66c9c8e04e51e98fca392.zip
CMake-8013ffd23b329fbc4ce66c9c8e04e51e98fca392.tar.gz
CMake-8013ffd23b329fbc4ce66c9c8e04e51e98fca392.tar.bz2
ENH: do not use crazy long paths to object files for try compile
Diffstat (limited to 'Source')
-rw-r--r--Source/cmLocalGenerator.cxx10
1 files changed, 10 insertions, 0 deletions
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index 0333a5e..f0fa9be 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -2286,6 +2286,16 @@ cmLocalGenerator::GetObjectFileNameWithoutTarget(const cmSourceFile& source)
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
// extension.