[CMake] always rebuild executable

Bill Hoffman bill.hoffman at kitware.com
Tue Oct 18 10:59:21 EDT 2011


On 10/18/2011 8:21 AM, Anton Sibilev wrote:
> Hi! Looking for some help..
> I use add_executable(exename) + target_link_libraries (exename
> staticlibname), linux OS. If 'staticlibname' is not under CMake and
> chagnes somehow, CMake will not rebuild executable.
> And so I have a problem, that I have few updates of 'staticlibname' lib,
> but very old executable. Can I force to rebuild executable every build?
>
>
If you use the FULL path to staticlib (via find_library).  Then it will 
rebuild when the file changes.

-Bill



More information about the CMake mailing list