Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Will gn auto generate to cmake a solution ? #7

Open
gengjiawen opened this issue Feb 28, 2020 · 2 comments
Open

Will gn auto generate to cmake a solution ? #7

gengjiawen opened this issue Feb 28, 2020 · 2 comments

Comments

@gengjiawen
Copy link
Collaborator

In the long run, will be possible we auto generate CMakeLists.txt ?

I see skia has a script like this
https://github.com/google/skia/blob/master/gn/gn_to_cmake.py

@bnoordhuis
Copy link
Owner

It's something I've considered but the thing is that I want to maintain tight control over what is built and how and I'm somewhat wary that's viable longer-term when the CMakeLists.txt is auto-generated. I'm not completely opposed to the idea, however.

@mzbik
Copy link
Contributor

mzbik commented Jul 15, 2020

Google GN and the BUILD.gn structure is pretty much equivalent to CMake. It takes a procedural/declarative description of the product and generates >one< build system from it. The output is already customized based on host and target architectures and various generation-time knobs.

This is not what I think Ben wants. He'd like to have all the same customization/etc. in CMake, not BUILD.gn.

Unfortunately, what's in the BUILD.gn files is >procedural< and it gets evaluated. We'd need to hack GN to not execute the BUILD.gn closures but to convert their logic into CMake code. I'm thinking this is REALLY not trivial.

I've got a modified gn_to_make.py that can make the inclusion of additional pieces of v8 a lot more mechanical, but it still takes a bunch of intelligence to figure this out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants