[CMake] Relink on library rebuild dilema
Sebastian Schaetz
seb.schaetz at gmail.com
Sun Nov 28 03:19:34 EST 2010
Michael Hertling <mhertling at ...> writes:
> 1) In the top-level CMakeLists.txt, you might say
>
> SET_SOURCE_FILES_PROPERTIES(
> main.cpp PROPERTIES OBJECT_DEPENDS
> ${CMAKE_CURRENT_BINARY_DIR}/kernels/libkernel_executable.a
> )
>
> When libkernel_executable.a has changed, this results in recompiling
> main.cpp - a penalty - and the desired relinking of main_target. If
> main.cpp's recompilation is expensive you may possibly add an empty
> cpp file to main_target's sources and impose the property on that.
>
Wow, those suggestions all sound great and I'm completely unfamiliar with them
(so I think there's a good chance they will work). I will try them as soon as
possible! Thanks a lot for the suggestions.
Sebastian
More information about the CMake
mailing list