4 ms·
This is misguided. If you look at any large cmake build, the cmake language is not the source of problems. It's the expressivity of the language that's the sour
by dimator 7y ago
This is misguided. If you look at any large cmake build, the cmake language is not the source of problems. It's the expressivity of the language that's the source of problems. Without rigorous style guides, developers can get as wild as they want. Cmake builds launching other cmake builds as part of the build? Sure throw that in! Loops, predicates, globals of unknown definition? Why not! Cyclomatic complexity run amok.
Choosing general purpose languages like D or python can only compound this problem. As anyone who has worked with Scons will tell you, having a fully functional language at your fingertips is a recipe for an opaque, undebuggable build.
The build syntax must be expressive as necessary, _but no more_.
> Pick a language to write your description in and place a file called reggaefile.{d,py,rb,js,lua} at the root of your project.
This sounds like a nightmare, not a feature. It's an interesting technical experiment, to be sure. But not a production structure.
- pjmlp 7y agoWhich is a big reason why I dislike Gradle, a slower version of Ant, with more spaghetti build code and memory usage.
- jcelerier 7y agoAs someone who "gets wild" in cmake, if it did not allow it I would basically have to write my own build system to do what I want (mostly parsing / preprocessing / code generation). These steps have to be somewhere and I'd much rather reuse the infrastructure available in cmake for that rather than roll my own - especially given how easily it runs on windows.
- maccard 7y agoI've also had to get wild in cmake (codegen), but in hindsight, the code that I wrote for that was the most brittle part of our build system at the time. I'd love to know of an alternative to writing gnarly cmake for stuff like this though, particularly to work cross platform and generate IDE projects.