Sorry as my post was not clear enough. I think my problem is not cmake specific. But may be I can get some better solution here.
Using CMake I am generating a common version file. version.h which contains current svn version of source code. In all application main.c I am including this file. Now every application is depending on this version.h and everything got rebuild. 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. Now as regards Vivek Goel On Thu, Oct 18, 2012 at 12:40 AM, Andreas Pakulat <ap...@gmx.de> wrote: > Hi, > > On Wed, Oct 17, 2012 at 9:02 PM, Vivek Goel <goelvivek2...@gmail.com> > wrote: > > Hi, > > I am buidilng 5 binary using cmake. > > Currently I am using svn source code version as app version for the > > application but it does not scale enough because if any file changed it > > force building of all the binary. > > Is there a way I can generate application specific version file only if > any > > dependency of app executable is changed ? > > Can you post example cmake code of how you're doing things? I'm not > quite understanding what you currently do and what exact behaviour you > see. Basically when you setup a target in CMake with a list of source > files, then that target is only rebuilt if one of the sources changes. > How this change is detected depends on the generator you use, for > example the Makefile generator will check the modification timestamps > of the files. So if svn changes the modification times of files on > every update then you're screwed when using makefiles. Find out why > that happens (are you maybe using an $Id$ tag in your source files?) > and fix that or switch to another generator. > > Andreas >
-- Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake