[cmake-developers] Path to object file
Brad King
brad.king at kitware.com
Wed Jul 5 17:23:53 EDT 2006
Bill Hoffman wrote:
> t 04:32 PM 7/5/2006, Andy Cedilnik wrote:
>
>>Hello,
>>
>>Could somebody look at the change:
>>
>>/cvsroot/CMake/CMake/Source/cmLocalUnixMakefileGenerator3.cxx,v <--
>>cmLocalUnixMakefileGenerator3.cxx
>>new revision: 1.152; previous revision: 1.151
>>
>>and make sure this makes sense?
>>
>>Before if the source file was in the source tree, the path to the object file included the subdirectory of the source file, while if the source file was outside the source tree, then you got some funky relative path that included absolute path to the source directory as a subdirectory.
>>
>>For example (source directory is /src/to/foo):
>>
>>ADD_EXECUTABLE(foo /foo/bar/lala.c)
>>
>>translated to (binary directory is /bin/to/foo):
>>
>>/bin/to/foo/CMakeFiles/foo.dir/foo/bar/lala.o
>>
>>I removed that second part, so now the path would be:
>>
>>/bin/to/foo/CMakeFiles/foo.dir/lala.o
>>
>>Any problem?
>
>
> I think the problem shows up when there is a lala.c in the current
> directory and /foo/bar/lala.c:
> ADD_EXECUTABLE(foo lala.c /foo/bar/lala.c) In your change this
> will fail.
This is correct, the "funky path" is necessary to be a unique name
without adding a number which may cause other rebuild problems. Please
remove the change. It just unfixes a bug I fixed a few months ago.
Thanks,
-Brad
More information about the cmake-developers
mailing list