[CMake] Gyp VS CMake

Nicolas Desprès nicolas.despres at gmail.com
Thu Feb 17 15:21:23 EST 2011


On Thu, Feb 17, 2011 at 4:23 PM, Bill Hoffman <bill.hoffman at kitware.com> wrote:
> On 2/17/2011 8:29 AM, Nicolas Desprès wrote:
>>
>> 2011/2/17 John Drescher<drescherjm at gmail.com>:
>>>>
>>>> But we are going off topic. The main point in my post was to trigger
>>>> discussion about how we could improve CMake, so that Gyp's
>>>> developers/users could use it.
>>>>
>>>
>>> I think one of their main points was to generate standalone projects
>>> that do not require CMake to build.
>>
>> Yes. As mentioned in point 5.
>>
> This will never happen with CMake.  CMake will always be required to be on
> the machine doing the build.   There is just no other way to do system
> introspection.  Also, if you don't have something like CMake around it is
> hard to write cross platform build files that are complex in anyway (i.e.
> needs to copy files at build time).
>
> So, if you remove try-compile, and all system introspection, find_program,
> find_library, etc, etc.  Also remove the ability to compute depends in
> makefiles.  If you took all those features away from CMake, you would be
> left with Gyp.

That's probably also why they get simpler generated project files. Of
course, when everybody work with the same toolschain at the same
location things get way simpler.

>
> So, there is a trade off with CMake, you have to install CMake on a machine
> to use CMake.  But, for complicated projects that depend on external
> libraries and have custom build steps, there really is no way around that.
>

Program written in a scripting language also have the same problem.
You need the interpreter to be installed on your machine. For most of
them you can find tools that bundle your script with the interpreter
in a standalone executable file. Ultimately, CMake could do the same.

-- 
Nicolas Desprès


More information about the CMake mailing list