[CMake] Multiple executables sharing object files

Joël Schaerer Joel.Schaerer at insa-lyon.fr
Wed Dec 19 15:32:38 EST 2007


Quoting Alexander Neundorf <a.neundorf-work at gmx.net>:

> On Wednesday 19 December 2007, Joel Schaerer wrote:
>> > Maybe I am missing something, but why not create a static library and
>> > share it with the executables?  Why try to reuse object files?  CMake
>> > makes it very easy to create static libraries and link them to
>> > executables.
>> >
>> > -Bill
>>
>> Because then you have to relink all executables each time you change one of
>> the library files, even the ones that don't rely on that file. Which isn't
>
> You could organize your static libs so that the executables only link to what
> they need.

Yeah, you could even create one static library per executable...  
Awesome! What was the problem with putting all the object files in the  
same directory, again? Shouldn't that be an option, at least? It would  
be SO much easier than all the dirty hacks I'm being proposed...

joel

>
> Alex
> _______________________________________________
> CMake mailing list
> CMake at cmake.org
> http://www.cmake.org/mailman/listinfo/cmake
>





More information about the CMake mailing list