[CMake] Force rebuild

Min Cu min.cu at hotmail.com
Mon Mar 26 18:38:22 EST 2007


Yes, that is more or less what I need. I have a project that generates a 
header file which is included in other projects. However, once the project 
is built when make is called the next time it does not get rebuilt. So, I 
guess my question is "How do I make the custom target run every built?" The 
solution needs to work on both Windows and Linux/Unix so I can't use the 
pre-build event. It is probably a silly question but I am new to CMake and 
don't know it well yet.

Thanks,
Min


>From: Bill Hoffman <bill.hoffman at kitware.com>
>Reply-To: billlist at nycap.rr.com
>To: Philip Lowman <philip at yhbt.com>
>CC: cmake at cmake.org, Min Cu <min.cu at hotmail.com>
>Subject: Re: [CMake] Force rebuild
>Date: Mon, 26 Mar 2007 09:49:58 -0400
>
>Philip Lowman wrote:
>>Min Cu wrote:
>>>I have a project which needs to be rebuild every time make is called 
>>>(whether the project has changed or not). How do I do it?
>>
>>One simple approach would simply be to remove CMakeCache.txt, run cmake 
>>from scratch and then type make.
>>
>That will not cause everything to re-build.
>>There's probably a better way though.
>>
>Well, I suppose you could do something like this.....
>
>Write a program that generates a header file that all files in your project 
>include.   Then create a custom target that creates the header file, and 
>have all other targets depend on that custom target.  Then make the custom 
>target run ever build and have it always generate the header file.
>
>-Bill
>
>_______________________________________________
>CMake mailing list
>CMake at cmake.org
>http://www.cmake.org/mailman/listinfo/cmake

_________________________________________________________________
Solve the Conspiracy and win fantastic prizes.  
http://www.theconspiracygame.co.uk/



More information about the CMake mailing list