[CMake] Object files of a target/source file

David.Karr at L-3COM.COM David.Karr at L-3COM.COM
Thu Dec 11 12:04:06 EST 2008


> In case you wonder why I need the object files:
>
> I'm working on porting a rather huge code to Windows which

"_To_ Windows" ... sigh.

> a) consists of about 70 shared libraries
> b) has cyclic dependencies between the libraries (yes, i agree...).  
> Under Unix-like platforms this is no problem, but under Windows I need

> to create an import libraries in order to break the cycle.
> c) is making heavy use of C++-templates (and typedefs thereof), so  
> identifying the places where I would need to insert these ugly and  
> stupid XXX_EXPORTS macros is just pure torture.

If I understand correctly, you don't need a permanent process, you need
something that will work once for each of 70 libraries--or perhaps
fewer, since some of them may not need import libraries.  Then your port
will be done and you only have the (presumably less painful) maintenance
issues.

What about starting with a clean binary build tree (no OBJ files,
compile exactly one of the libraries (with "build only this project" so
it doesn't cause any other builds to be attempted), and use the Windows
Explorer "search" capability to see where the OBJ files were written?
(A "find" function that worked in a command window would probably work
better, of course.)

I don't know if this is a "good" solution but it might at least be
better than the alternative mentioned in (c).

David Karr



More information about the CMake mailing list