[CMake] Re-executing CMake from the Makefile.
Bill Hoffman
bill.hoffman at kitware.com
Thu Aug 14 10:57:42 EDT 2008
Óscar Fuentes wrote:
> Currently, when `make' is executed and a CMakeList.txt file is out of
> date, `cmake' is automatically invoked and then `make' continues. Is it
> possible to do this (on a reliable way) with an arbitrary file?
>
> I need to re-execute `cmake' whenever certain file changes. I wonder if
> is possible to do this from `make' itself, so the user does not need to
> remember that he must execute `cmake' first.
>
If the file you depend on is part of the input to cmake then cmake will
do that automatically. You could use the configure_file command to do
this. If you did something like this:
configure_file(/my/file/input dummyout)
Then when ever /my/file/input changed cmake would re-run at make time.
-Bill
More information about the CMake
mailing list