Skip to content

[Discussion] should we make CMake support as core function #100

Open

Description

@gengjiawen

Related: nodejs/TSC#648.

If so, I want to add check to enhance this.

Activity

  1. joaocgreis commented on Feb 13, 2019

    @joaocgreis
    Member

    Not sure why to discuss this in node-gyp, wouldn't we need a node-cmake to use cmake for native modules?

    In nodejs/TSC#648 there seems to be consensus that the build system for node core doesn't need to be the same for native modules. I don't think we will be able to stop supporting node-gyp soon, even if we move to something else there will probably be modules that will take a long time to update.

    In my opinion, it would be great if we could find the resources to make Gyp.js the solution, not breaking anything in the ecosystem and not depending on anything besides Node.

  2. richardlau commented on Feb 14, 2019

    @richardlau
    Member

    Not sure why to discuss this in node-gyp, wouldn't we need a node-cmake to use cmake for native modules?

    https://github.com/cmake-js/cmake-js already exists for native modules.

  3. gengjiawen commented on Feb 14, 2019

    @gengjiawen
    MemberAuthor

    Not sure why to discuss this in node-gyp, wouldn't we need a node-cmake to use cmake for native modules?

    I mean the CMake files for node itself. node-gyp can gernerate CMake files, but not tested for nodejs repo.

    CMake function is defined in https://github.com/nodejs/node-gyp/blob/master/gyp/pylib/gyp/generator/cmake.py.

  4. richardlau commented on Feb 14, 2019

    @richardlau
    Member

    Not sure why to discuss this in node-gyp, wouldn't we need a node-cmake to use cmake for native modules?

    I mean the CMake files for node itself. node-gyp can gernerate CMake files, but not tested for nodejs repo.

    CMake function is defined in https://github.com/nodejs/node-gyp/blob/master/gyp/pylib/gyp/generator/cmake.py.

    Then as @joaocgreis pointed out this discussion item is in the wrong place. This repository is for the node-gyp module used to compile native addons.

  5. gengjiawen commented on Feb 14, 2019

    @gengjiawen
    MemberAuthor

    I see. It should be in gyp then, though it's maintained by google.

  6. richardlau commented on Feb 14, 2019

    @richardlau
    Member

    I see. It should be in gyp then, though it's maintained by google.

    @refack Whatever happened to nodejs/admin#247?

  7. gengjiawen commented on Jul 28, 2019

    @gengjiawen
    MemberAuthor

    For anyone want to try cmake, you can change the code here, change it to argv.push('-f', 'cmake') :
    https://github.com/nodejs/node-gyp/blob/2592036261ec588689e07072e1bef31993a9d7ac/lib/configure.js#L228-L240

  8. gengjiawen commented on Jul 28, 2019

    @gengjiawen
    MemberAuthor

    Also, you can directly use node-gyp configure -- -f cmake

  9. gengjiawen commented on Oct 27, 2019

    @gengjiawen
    MemberAuthor

    I am thinking make cmake-support more offcial, reopening this

    Related: https://github.com/orgs/nodejs/teams/collaborators/discussions/78

  10. rvagg commented on Oct 27, 2019

    @rvagg
    Member

    @gengjiawen if you want to champion this then I'd support it. It's just something that needs people and there's no extra bandwidth here in the existing team to extend to this. We can bolster the test suite and CI to make sure it works nicely though.

    Some things to be aware of when deciding to invest in this though:

    1. https://github.com/cmake-js/cmake-js is relatively popular and I expect it to gain in popularity. People are already switching their addon builds to it and IMO that kind of diversity is a good thing.
    2. We want to push toward gyp.js in the near future. The plan is to put out a release with an opt-in --gypjs and iterate on its compatibility to where it's opt-out and eventually remove gyp.py. Currently gyp.js depends on ninja.js for builds, having CMake output would be a nice addition to it.
  11. transferred this issue fromnodejs/node-gypon Mar 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions