name.c files each define a (dummy) function, with different names though!
It creates two
OBJECT libraries with names
bar, and a
libfinal.a static library out of the object files of these two.
Inspecting the created
So both object files are in the library. Showing the offset of these files also clearly shows that these are different files:
Linking will search these libraries for the required symbols and just link them if necessary; the names don’t come into play there. Except of course in error messages / debugging output, so it would be really helpful if CMake could add a prefix to the object files somehow … I only found an unanswered post on the mailing list from 2014, though.