[CMake] Force rebuild
Bill Hoffman
bill.hoffman at kitware.com
Mon Mar 26 08:49:58 EST 2007
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
More information about the CMake
mailing list