Support for Ninja generator in CMake #461

Closed
Barthalion opened this Issue Dec 28, 2016 · 4 comments

Projects

None yet

3 participants

@Barthalion
Contributor

Currently flatpak-builder assumes -G 'Unix Makefiles'. CMake also supports generating Ninja rules, but looking at the code, it's not really supported directly.

I can provide a patch, although I'm not convinced what's the best way to tackle it, that is, whether there should be an option in manifest cmake-ninja or developer should pass -GNinja to cmake and then flatpak check for build.ninja existence and then fallback to regular Makefile. Let me know what you think about it.

@TingPing
Contributor

I was interested in the same thing. I don't know a ton about CMake projects but is it common that Ninja breaks any? Maybe that should just be the default if it has no downsides?

@Barthalion
Contributor

I remember having issues with install target when Ninja generator was used while Make was working fine (certainly a bug in upstream project, but still…). I don't think it's the best idea to be too opinionated about packaging tools.

@alexlarsson
Member

We could use buildsystem: "cmake-ninja" for this i guess. Its possible to pass in the -GNinja argument currently, but it will still run make after cmake...

@Barthalion
Contributor

Yes, although it could be modified to run make or ninja depending on which file exists. I will provide patch implementing cmake-ninja tomorrow.

@Barthalion Barthalion added a commit to Barthalion/flatpak that referenced this issue Dec 30, 2016
@Barthalion Barthalion builder: add cmake-ninja support
The commit adds another buildsystem, cmake-ninja, that tells
CMake to generate Ninja rules instead of Makefile.

Fixes #461.
256fd27
@Barthalion Barthalion added a commit to Barthalion/flatpak that referenced this issue Jan 2, 2017
@Barthalion Barthalion builder: add cmake-ninja support
The commit adds another buildsystem, cmake-ninja, that tells
CMake to generate Ninja rules instead of Makefile.

Fixes #461.
912c7bc
@Barthalion Barthalion added a commit to Barthalion/flatpak that referenced this issue Jan 5, 2017
@Barthalion Barthalion builder: add cmake-ninja support
The commit adds another buildsystem, cmake-ninja, that tells
CMake to generate Ninja rules instead of Makefile.

Fixes #461.
1cfb914
@Barthalion Barthalion added a commit to Barthalion/flatpak that referenced this issue Jan 16, 2017
@Barthalion Barthalion builder: add cmake-ninja support
The commit adds another buildsystem, cmake-ninja, that tells
CMake to generate Ninja rules instead of Makefile.

Fixes #461.
ad5d455
@alexlarsson alexlarsson added a commit that closed this issue Jan 20, 2017
@Barthalion @alexlarsson Barthalion + alexlarsson builder: add cmake-ninja support
The commit adds another buildsystem, cmake-ninja, that tells
CMake to generate Ninja rules instead of Makefile.

Fixes #461.
751cae4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment