summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorAndy Cedilnik <andy.cedilnik@kitware.com>2006-07-05 20:27:44 (GMT)
committerAndy Cedilnik <andy.cedilnik@kitware.com>2006-07-05 20:27:44 (GMT)
commit24e6ffae3605f54c4ef75a151206fec14ab06ec0 (patch)
treecc37c51a28bee38b5bcae531d85324d67070c89c /Source
parentcf80510ac523a33f2ca2970208f028382cf956a7 (diff)
downloadCMake-24e6ffae3605f54c4ef75a151206fec14ab06ec0.zip
CMake-24e6ffae3605f54c4ef75a151206fec14ab06ec0.tar.gz
CMake-24e6ffae3605f54c4ef75a151206fec14ab06ec0.tar.bz2
BUG: If the source file specified is not in a source tree, do not use full path to the file
Diffstat (limited to 'Source')
-rw-r--r--Source/CMakeLists.txt1
-rw-r--r--Source/cmLocalUnixMakefileGenerator3.cxx5
2 files changed, 6 insertions, 0 deletions
diff --git a/Source/CMakeLists.txt b/Source/CMakeLists.txt
index 3f8bb1a..3da7ef5 100644
--- a/Source/CMakeLists.txt
+++ b/Source/CMakeLists.txt
@@ -962,6 +962,7 @@ IF(BUILD_TESTING)
--build-target install
# --build-target package
--build-options "-DCMAKE_INSTALL_PREFIX:PATH=${BundleTestInstallDir}"
+ "-DCMake_SOURCE_DIR:PATH=${CMAKE_SOURCE_DIR}"
--test-command
${BundleTestInstallDir}/Application/BundleTestExe.app/Contents/MacOS/BundleTestExe)
diff --git a/Source/cmLocalUnixMakefileGenerator3.cxx b/Source/cmLocalUnixMakefileGenerator3.cxx
index 3f5be33..81a2c62 100644
--- a/Source/cmLocalUnixMakefileGenerator3.cxx
+++ b/Source/cmLocalUnixMakefileGenerator3.cxx
@@ -1674,6 +1674,11 @@ cmLocalUnixMakefileGenerator3
{
objectName = relFromSource;
}
+ else
+ {
+ // This is not relative to source or binary, so make it no path at all
+ objectName = cmSystemTools::GetFilenameName(objectName.c_str());
+ }
}
// Replace the original source file extension with the object file