[CMake] Partial linking.
Óscar Fuentes
ofv at wanadoo.es
Sat Aug 9 23:57:29 EDT 2008
A project is made of a number of libraries. There are cyclic
dependencies. This is solved with partial linking.
Partial linking, in this case, consists on combining a number of object
files to build a single object file (see the -r switch of `ld'), which
is put on ${CMAKE_LIBRARY_OUTPUT_DIRECTORY} and explicitly added to the
link command of executables that depends on the symbols defined on those
object files.
How can I perform partial linking with CMake?
The simplest solution seems to build a regular static library with
add_library, and then apply a custom command that extracts the object
files and performs the partial linking.
--
Oscar
More information about the CMake
mailing list