On 09.03.2012 03:34, Peter Collingbourne wrote:
On Thu, Mar 08, 2012 at 05:44:09PM -0500, Bill Hoffman wrote:
Thoughts?

Hi Bill,

I thought about this for a while and I decided that this probably
isn't a good idea for a few reasons:

1) It is inaccurate.  The Ninja generator uses a fundamentally different
    approach to generating build files and I think that should be
    reflected in the name.

2) If we go with your suggestion, things will continue to work if what
    the project does for Make happens to also be appropriate for Ninja.
    But that isn't always the case -- if the project cares about
    which generator is being used then it may well be doing something
    specific to the Makefile generator (such as relying on the fact
    that CMake builds recursive makefiles by running the build program
    in a subdirectory, or using "$(MAKE)" -- you can see an example
    of that in ExternalProject.cmake).  In that case things would break
    unless the conditional excludes Ninja:

    IF(CMAKE_GENERATOR MATCHES "Makefiles" AND NOT CMAKE_GENERATOR MATCHES 
"Ninja")

    Things like that need to be decided on a case by case basis by
    the project developer and I don't see any reason to favour one
    scenario over the other.  All things being equal I would err on
    the conservative side and say that Ninja shouldn't receive any
    special treatment from projects by default -- if projects need
    the Ninja generator to get the same special treatment, they can
    match Ninja explicitly.

3) Less typing :) (Though one idea I had for improving the
    user interface for the -G option was to allow the argument to
    be matched case insensitively, and for unambiguous prefixes to
    be expanded.  So for example you could say -G nmake which would
    be disambiguated to "NMake Makefiles", but -G n would return an
    error since it matches both Ninja and NMake).

Yes, please don't call it a Makefile when it is definitely NOT a Makefile.

I also like the short -GNinja. -G"Visual Studio 9 2008" is really to long
as command line argument.

Peter



--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

Reply via email to