i'm never writing 3300 lines of cmake in a row again
-
there's an ideal amount of cmake someone should write in a row and it's definitely less than that
@whitequark i'm happy at 0
-
@whitequark i hope to never write 3300 lines of cmake total in the rest of my life tbh
@dysfun the hard part was divining out what ~1500 lines of incomprehensible makefile spaghetti did, with its definition-redefinition-reredefinition of variables, dozens of instances of
CFLAGS_WITHOUT_THIS_ONE_THING = $(filter ,), and implicit behaviors that some other thing half the build system across critically relies on -
i'm never writing 3300 lines of cmake in a row again
@whitequark@social.treehouse.systems Oh god, don't put them all in a row! Use line breaks

-
@dysfun the hard part was divining out what ~1500 lines of incomprehensible makefile spaghetti did, with its definition-redefinition-reredefinition of variables, dozens of instances of
CFLAGS_WITHOUT_THIS_ONE_THING = $(filter ,), and implicit behaviors that some other thing half the build system across critically relies on@whitequark sounds like the average cmake project to me
-
there's an ideal amount of cmake someone should write in a row and it's definitely less than that
@whitequark Yeah, 15-100 should be enough for everybody
-
@meena i think if a makefile fits on a single screenful it might be okay. if it doesn't it definitely isn't
-
@whitequark sounds like the average cmake project to me
@dysfun well, yes, i pride myself on writing best-in-class cmake, not average cmake
the difference is that you can make well-factored cmake files that grow with the project, but if you try to do this faithfully with makefiles you end with... cmake, or something similar
-
@dysfun well, yes, i pride myself on writing best-in-class cmake, not average cmake
the difference is that you can make well-factored cmake files that grow with the project, but if you try to do this faithfully with makefiles you end with... cmake, or something similar
@whitequark yes. i've tended to do the makefile thing because it's less confusing if i know how it all works. i am not sure i know how anything in cmake works despite how much i've used it.
i've been using meson recently, but i haven't pushed it nearly as hard as i push make. i don't hate it yet, so that's something.
-
@meena i think if a makefile fits on a single screenful it might be okay. if it doesn't it definitely isn't
@whitequark @meena I apply roughly the same limit to shell scripts, along with a prohibition on any control flow more complex than - at a stretch - two layers of nested if statements.
-
@meena i think if a makefile fits on a single screenful it might be okay. if it doesn't it definitely isn't
@whitequark @meena you will certainly not regret writing 30-40 lines of makefile
-
R relay@relay.infosec.exchange shared this topic