[CMake] Avoiding a relink

Bill O'Hara billtohara at gmail.com
Fri Feb 27 14:09:37 EST 2009


Lets say I have a CMakeLists.txt like this:

add_library(foo STATIC foo.c bar.c)
add_executable(test test.c)
target_link_libraries(test foo)

where test.c uses only functions defined in foo.c but not bar.c (assume some
other target will use foo as well and use functions from both foo.c and
bar.c).

Is it possible to avoid the relink of test when foo is changed because of a
change in bar.c? Just as an optimization to avoid unnecessary relinks to
speed up the user experience?

thanks
b.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20090227/5b99aa99/attachment.htm>


More information about the CMake mailing list