DEV Community

loading...

Discussion on: Autotools vs Cmake

Collapse
vimmer9 profile image
Damir Franusic Author

I think we digressed a bit from the initial topic but the gist of it is that there's no clear winner. For my current project, I created both autotools and cmake versions and they are both equally effective. It will take me some time to adjust to cmake syntax and learn all the commands, but I think it's worth the effort. One feature that goes in favour of cmake is, in my opinion, the lack of those disgusting m4 scripts.

Collapse
kamtron profile image
Cameron Druyor

+1 for lack of m4

other cmake pros for me:

  • transitive dependency management (cmake 3 targets)
  • integration with CLion
  • automatic parallel compilation for fortran (useful for huge legacy codes)

cmake cons:

  • modern cmake (3.0+) fixes a lot of old cmake problems, but just googling for a solution when you first start using cmake pulls up lots of wrong/old stuff that can lead you into using anti-patterns

If you're determined enough, you can write a horrifying build system in either one! I've seen it done (and been guilty myself while learning).