[CMake] Most better way to rebuild library if property changed

Vasily Soshnikov dedok.mad at gmail.com
Wed Jul 16 17:30:30 EDT 2014


Hi,

let say I have C library and I wish set difference "-D" options to this
library  ( must recompile library )  and exe should not known about those
options.

Scheme:

lib + -DFEATURE1 && -DFEATURE2 -> lib with FEATURES 1 & 2 -> exe0
lib + -DFEATURE2 && -DFEATURE3 -> lib with FEATURES 2 & 3 -> exe1

Solutions which I found:
1) Linking each exeN with libraries separated by names: lib_f1_f2 ... fn ->
exeN.
2) Create configuration ( f1_f2_conf.c file ) file which will generated by
CMake for each case exeN.

Maybe there are more better solutions?

-- 




*Regard,Soshnikov Vasily mailto:dedok.mad at gmail.com <dedok.mad at gmail.com>*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/cmake/attachments/20140717/a95b0fbb/attachment.html>


More information about the CMake mailing list