[CMake] Patch to apply! Changing the default name"CMakeLists.txt"!

Bill Hoffman bill.hoffman at kitware.com
Mon Jan 14 12:16:56 EST 2008


Brandon Van Every wrote:

> 
> Example: I have a legacy handwritten GMake client.mk that acquires the
> build tree from CVS before the main Autoconf generated Makefile is
> run.  The tree is grabbed from CVS and built by typing "make -f
> client.mk".  The simplest translation to a CMake system would be
> "cmake -f client.txt".  Nobody would be doing a different drill, the
> client would perceive this as nice, to not have to learn much of
> anything different.  Once the build tree has been acquired, we don't
> need client.mk anymore.  The equivalent of Autoconf's Makefile should
> always be CMakeLists.txt.
> 

But that is not all the patch does.

If you do cmake -f client.txt, then every add_subdirectory and subdirs 
will now look for client.txt.   That is not the way make -f works.  If 
you do make -f it just changes the initial makefile that is read into 
make, after that it is up to the makefile writer to use include, or 
recursive make to specify additional makefiles that are included.  And, 
cmake -f client.txt would not be the same thing as make -f client.mk, as 
make -f client.mk would actually do a build.  For the cmake, one you 
would have cmake -f client.txt, make (with no -f).  I am still not 
convinced this is a good idea.

-Bill


More information about the CMake mailing list