cglm
cglm copied to clipboard
Use a single build system
At the moment, cglm
can be built with the following build systems:
- CMake
- Meson
- Swift package manager
- Autotools
- MSBuild
It is not realistic to expect developers to check that cglm
compiles correctly on all 5 build systems before making a pull request. So if a change breaks one build system, it is possible that the problem will go unnoticed.
Building with different systems can result in different libcglm.so
files (building with CMake and Meson generate libcglm.so
with different hashes). If a bug only occurs when building with a specific build system then it could be very difficult to find.
For these reasons, it would be better to use only a single build system. I think CMake would be most appropriate as its cross platform and because glm
uses it.
I would be happy to make a pull request for this change if a single build system can be agreed upon.
Hi @Chris-F5 ,
Thanks for the feedback, let's get more feedback for this.
MSBuild at least can just be generated by either Meson or CMake, so it's probably not very important to keep. Also handwritten XML is going to be the hardest thing to keep up to date anyway.
Like cmake's support for add_subdirectory on another cmake project, there's one particular advantage to having meson support in that you can embed it as a subproject inside your own meson-using project and it "just works". This is described in the README the same way it's described for cmake. This advantage is not present in autotools (and unlike both cmake and meson, autotools is not cross-platform enough to run well on Windows so an entire class of people cannot use it anyway).
Building with different systems can result in different
libcglm.so
files (building with CMake and Meson generatelibcglm.so
with different hashes). If a bug only occurs when building with a specific build system then it could be very difficult to find.
Different hashes can be caused by using different file paths when referencing the source files, that's not really a good proof of anything. Looking at differences in the compiler invocations in build.ninja or compile_commands.json should tell you all you need to know there.
@eli-schwartz thanks for your feedbacks 👍
The autotools build is currently broken (the built cglm.pc includes placeholders).
Hi @q234rty,
With this PR, cmake uses separate pkg-config input file and the issue must be fixed I guess: https://github.com/recp/cglm/pull/271
not sure if applicable, one way I have seen this addressed is to add build steps on CI to build in all supported build systems.
@masters3d sure hope we update CIs to cover all build systems 👍
I've submitted #386 which adds a bunch of CI.