Sorry as my post was not clear enough. <div>I think my problem is not cmake specific. But may be I can get some better solution here. </div><div><br><div>Using CMake I am generating a common version file. </div><div>version.h which contains current svn version of source code. </div>
<div>In all application main.c I am including this file. </div><div>Now every application is depending on this version.h and everything got rebuild. </div><div><br></div><div>I want to change this logic so application will have their own version and version.h file should be generated only if any other dependency of application is changed. </div>
<div><br></div><div><br></div><div><br></div><div><br>Now as <br clear="all">regards<div>Vivek Goel</div><br>
<br><br><div class="gmail_quote">On Thu, Oct 18, 2012 at 12:40 AM, Andreas Pakulat <span dir="ltr"><<a href="mailto:apaku@gmx.de" target="_blank">apaku@gmx.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<br>
<div><div class="h5"><br>
On Wed, Oct 17, 2012 at 9:02 PM, Vivek Goel <<a href="mailto:goelvivek2011@gmail.com">goelvivek2011@gmail.com</a>> wrote:<br>
> Hi,<br>
> I am buidilng 5 binary using cmake.<br>
> Currently I am using svn source code version as app version for the<br>
> application but it does not scale enough because if any file changed it<br>
> force building of all the binary.<br>
> Is there a way I can generate application specific version file only if any<br>
> dependency of app executable is changed ?<br>
<br>
</div></div>Can you post example cmake code of how you're doing things? I'm not<br>
quite understanding what you currently do and what exact behaviour you<br>
see. Basically when you setup a target in CMake with a list of source<br>
files, then that target is only rebuilt if one of the sources changes.<br>
How this change is detected depends on the generator you use, for<br>
example the Makefile generator will check the modification timestamps<br>
of the files. So if svn changes the modification times of files on<br>
every update then you're screwed when using makefiles. Find out why<br>
that happens (are you maybe using an $Id$ tag in your source files?)<br>
and fix that or switch to another generator.<br>
<span class="HOEnZb"><font color="#888888"><br>
Andreas<br>
</font></span></blockquote></div><br></div></div>