Saturday, February 18, 2017

CMake in Layman's Terms

CMake is basically just a collection of tools for building, compiling and testing software. Generally, it's used in projects almost like a configuration tool. If you've ever built a package from source, you've probably had to do a `./configure ... ` before doing a `make && make install`.

From what I've used of CMake so far (I've only just run through the tutorial in an attempt to figure out how to integrate CPP Requests (cpr) into a project I've been working on), CMake basically generates a Makefile for you without you having to go through a bunch of stuff. It seems to work sort of like python's package setup utility or `./configure`. Not sure about that, so don't take my word for it.

You can find CMake tutorials here. Note that it only seems to really shine for more complex systems, so unless your project is huge, it probably won't be worth trying to figure out and you should just stick with writing your own good ol' Makefiles. It's also good for cross platform `making`. That is, I can use `make` the same way on every system that I please, unlike with regular ol' Makefiles. It's up to you.

No comments:

Post a Comment