(Anyone tried building GTK+ on OSX lately, installing to a prefix that I believeĬMake to be more widely used than other such tools and less broken. Personally, I don’t care if SDL switches to CMake or not. Not so much thrilled by the XCode and Eclipse projects Makefiles it generated worked flawless, though. To edit CMakeCache.txt by hand to get past the cmake invocation. Got it to find SDL_Mixer under my MSys build environment. Sometimes don’t care about case-sensitivity, etc. Each of those is written differently, theyĪll search in different locations and those in different orders, More on topic, the whole situation with the FIND_package macros inĬMake is my biggest gripe. Guess it will be less ideal on a pure MSVC development environment. I personally use this on Linux, OSX and MSys, but I PKGCONFIG_FOUND / PKGCONFIG macros to compensate for a missingįIND_SDL2 macro. Just to clarify, I specifically suggested the use of CMake’s This will perform on non-Unixish environments: While it is probably true that Meson is “faster” than autotools, this simple experiment shows that we probably cannot say the same with CMake (or modern CMake, at least).Another option would be to use pkgconfig, although not quite sure how I don’t know why this happens, my best guess is that CMake has a better ninja generator (which would make sense since CMake is older). In both cases we performed a debug build.ĭespite CMake having a bigger build.ninja, the CMake build takes 2 seconds less than the Meson build (13.3% faster). In both cases we built a static library and a simple executable linking to that library. If I run ninja from the Meson build folder instead: $ time ninja When I run ninja from the CMake build folder I get: $ time ninja This is where CMake performs better than Meson. CMake also generates a rules.ninja file (83 LOC) that is included in build.ninja, while Meson doesn’t.Īgain, I don’t think the configuration step is that relevant, so let’s move on to what actually matters: build times. At the end of the configuration step, there are 21 files in the CMake build folder and 10 files in the Meson build folder. For the record, CMake generates a 435 LOC build.ninja file, while Meson’s build.ninja is only 289 LOC. While with Meson: $ time meson meson-buildĪccording to this first test, Meson is faster than CMake to configure the demo project. But anyway here we go: $ time cmake -GNinja -DCMAKE_BUILD_TYPE =Debug. The elapsed time of the configuration step is not really relevant, since you usually run it only once. I cannot claim this is true in general, but it surely shows that Meson is not perfect and probably not “faster” than CMake, in general. What I found out is that Meson’s build time is actually higher than CMake’s. The test has been performed with the ninja backend. Libqmatrixclient uses CMake, but I stripped down its CMakeLists.txt just to be sure to compare a minimal CMake configuration with a minimal Meson configuration. It builds a C++ (static) library and a little example app that links to that library. I used libqmatrixclient as test project, since it’s not a trivial hello-world app yet not the most complex project ever. Someone said that Meson provides supposedly faster build times than CMake and I was quite surprised to hear that. This question came up on reddit yesterday, since many projects have been porting their build system to Meson (most of them from autotools, some from CMake).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |