[CMake] automatically re-generating makefiles

Brad King brad.king at kitware.com
Tue Mar 17 16:36:13 EDT 2009


Matthew Woehlke wrote:
> Bill Hoffman wrote:
>> I still don't get the original problem???   We used to have Makefile: 
>> <build system files>.  It was removed when that work was pushed into 
>> cmake_check_build_system.
> 
> Ah. Maybe it should come back?

The problem with

   Makefile: input-foo.txt input-bar.txt
	regenerate-rule

is that when someone removes "input-bar.txt" from disk Make will refuse
to run the regeneration rule.  This is just a fundamental limitation of
using make to build.  AFAIK there is no way to implement the

   make my-new-target

interface reliably.  In the future we plan to create a "cbuild" tool to
drive native builds and a corresponding CMake generator for it.  That
tool will be able to provide whatever fancy interface we want.  Until
then we are limited by the fact that make runs before CMake can look
at the tree.

-Brad



More information about the CMake mailing list