
Hi, I've stumbled on that "Duplicate name of actual target" error; unfortunately the FAQ doesn't seem to solve my problem, since I'm trying to compile two different files which happen to have the same basename, i.e. something like this: lib foo : bar/test.cpp baz/test.cpp ; What's the proper way to handle this situation, except for manually specifying the object file name? Regards, Michael

Michael Walter wrote:
I've stumbled on that "Duplicate name of actual target" error; unfortunately the FAQ doesn't seem to solve my problem, since I'm trying to compile two different files which happen to have the same basename, i.e. something like this:
lib foo : bar/test.cpp baz/test.cpp ;
What's the proper way to handle this situation, except for manually specifying the object file name?
Rename one of the files. -- Dick Hadsell 914-259-6320 Fax: 914-259-6499 Reply-to: hadsell@blueskystudios.com Blue Sky Studios http://www.blueskystudios.com 44 South Broadway, White Plains, NY 10601

Richard Hadsell wrote:
Michael Walter wrote:
I've stumbled on that "Duplicate name of actual target" error; unfortunately the FAQ doesn't seem to solve my problem, since I'm trying to compile two different files which happen to have the same basename, i.e. something like this:
lib foo : bar/test.cpp baz/test.cpp ;
What's the proper way to handle this situation, except for manually specifying the object file name?
Rename one of the files.
CMake handles this with no problem... :-) add_library(foo bar/test.cpp baz/test.cpp) -Bill

Bill Hoffman <bill.hoffman <at> kitware.com> writes:
[...]
Michael Walter wrote:
I've stumbled on that "Duplicate name of actual target" error; [...] CMake handles this with no problem...
As will boost build v2 when #83 is closed. http://zigzag.cs.msu.su/boost.build/ticket/83 It was almost resolved once, but still had some issues and was too close to 1.34 release to not back-out. Seems to be time to start looking at reintroducing the change and resolving these remaining issues to finish this one off. -Ryan

Hi Michael, On May 16, 2007, at 11:58 AM, Michael Walter wrote:
I've stumbled on that "Duplicate name of actual target" error; unfortunately the FAQ doesn't seem to solve my problem, since I'm trying to compile two different files which happen to have the same basename, i.e. something like this:
lib foo : bar/test.cpp baz/test.cpp ;
What's the proper way to handle this situation, except for manually specifying the object file name?
The only way I know to do this, short of renaming the source file, is like this object bar_test : bar/test.cpp ; lib foo : bar_test baz/test.cpp ; unless you're willing to create separate bar and baz Jamfiles. -- Noel
participants (5)
-
Bill Hoffman
-
K. Noel Belcourt
-
Michael Walter
-
Richard Hadsell
-
Ryan Gallagher