3 ms·
AFAICT to use CMake for dependency discovery you have to either be or require CMake, the full interdependent coupling of a macro language and half-of-a build to
by mananaysiempre 4y ago
AFAICT to use CMake for dependency discovery you have to either be or require CMake, the full interdependent coupling of a macro language and half-of-a build tool. Regardless of the merits of either part, that’s a lot to implement and a lot to commit to.
Pkg-config, on the other hand, is rather small. The initial implementation was bulky enough to annoy people into at least two rewrites, but the concepts are few and the requirements on the host build system practically nonexistent.
(One place where the CMake-like approach won is the editable form of scientific documents. I like TeX to bits, but you can’t even tokenize it without being TeX, and even if you are essentially the only operation you can do on it is typeset, those even feed into each other. Thus the current two decades of half-working AST-producing parsers and ugly HTML generators and DVI extractors and whatnot.)
So, no, I’m not the least bit sad CMake didn’t win the game, not any more than I’m sad autom4te didn’t. Pkg-config isn’t ideal, but as far as not forcing the whole world into its image it’s miles better.
- jcelerier 4y ago> Pkg-config, on the other hand, is rather small. The initial implementation was bulky enough to annoy people into at least two rewrites, but the concepts are few and the requirements on the host build system practically nonexistent. yet all these years and it's still a pain on Windows with the Visual Studio world. And if it doesn't work with VS (as in, you can have a VS solution which uses pkg-config automatically to find libraries / flags / ... without having to fudge with scripting it yourself) it's 100% irrelevant to any cross-platform discussion (and thus most of C / C++ / native ... software development).
- mananaysiempre 4y agoThere’s “builds on Windows” cross-platform and there’s “works on a big-endian MIPS router with a 2.6.x series Linux kernel and an ancient Busybox” cross-platform. And a lot more. All of those are important to somebody. So “100% irrelevant to any cross-platform discussion” for lack of Windows support sounds overexaggerated to me, let alone for lack of Visual Studio support. Also, well. Before the article under discussion, there was no decent Windows support, because no pkg-config user was willing to donate their time or spend their money to improve the Microsoft Windows ecosystem. Now somebody came around and there is. Perhaps that will happen to the Microsoft Visual Studio ecosystem as well, in time, or perhaps not. Probably not going to be me, though. (In the case of CMake, the support appeared when Microsoft spent their money on improving the Microsoft Visual Studio ecosystem, because C++ programmers not using Visual Studio became numerous enough, and CMake became popular enough among them, that not being to interoperate with their work diminished the IDE’s value. I don’t see that happening with pkg-config, mainly because a lot of its usage is in the C world, and Microsoft doesn’t really care all that much about that.)
- saurik 4y agoIf you are serious about cross-platform, the answer is simple, and has been the same for decades: don't use Visual Studio to build for Windows, as it isn't offering you anything of value. This answer used to be maybe a bit controversial--hell: I even supported Visual Studio for years back in the early '00s--but now even Chrome builds with clang... if it is good enough for Chrome, it is good enough for you.
- jcelerier 4y agothe main soft I develop (https://ossia.io https://ossia.io) has been built through clang/libc++ on msw for 4+ years now so you are preaching to the choir, but many companies insist in building with msvc and you cannot just tell them "no"
- megous 4y agoSounds like a similar difference like between make and ninja...