← Back to team overview

kicad-developers team mailing list archive

Re: version info does not get updated

 

What I did in my previous build systems is to regenerate the file in a
temporary directory then check if the files had the same hash. If they
didn't I'd update the file.

This way, if you don't change the file's contents it doesn't get touched
and nothign else gets rebuilt.

On Sun, 2014-08-31 at 22:50 +0100, Brian Sidebotham wrote:
> On 31 August 2014 22:27, Andrew Zonenberg <azonenberg@xxxxxxxxxxxxxxx> wrote:
> > Why does CMake not recompute this particular value during the
> > pre-compile configuration step? It runs checks for changed stuff every
> > time you "make" anyway and only caches certain things. Is it really that
> > hard to not cache this particular value?
> 
> Currently KiCad uses a configure file mechanism for the version.h file
> and it's not normal to regenerate these each time you make otherwise
> you end up re-compiling everything that uses the file and then
> re-linking everything that links to that target if the target's a
> library (which in this case it is).
> 
> Therefore, when you bzr up - make rebuild_cache too in order to update
> the version number. Caching this value makes subsequent repetitive
> builds quicker. If you can suffer the time, just do a simple cheat:
> 
> bk.sh
>     #!/bin/bash
>     make rebuild_cache
>     make
> 
> just use bk.sh instead of make...
> 
> The following is from CMakeModules/version.h.cmake :
> 
> /*
>  * Define the current source code Subversion commit number.  The version
>  * string defined below does not update automatically when building the
>  * source with make.  Run make rebuild_cache to update version strings.
>  */
> 
> Best Regards,
> 
> Brian.

-- 
Andrew Zonenberg
PhD student, security group
Computer Science Department
Rensselaer Polytechnic Institute
http://colossus.cs.rpi.edu/~azonenberg/

Attachment: signature.asc
Description: This is a digitally signed message part


Follow ups

References