blumenplace

smart plant watering blog

CMake and IDE setup

Mar 23, 2015

This tutorial really does not bring anything new in the meaning of code. Basically we have copied all source files from the previous post and put them under hw and src folders. But we also added one small file called CMakefile.txt that dramatically changes the way of how you think about building C/C++ projects.

The good practice when you building CMake project is to create a separate build directory and start cmake utility from there. This method is called “out of source build”. A significant advantage of this method is that this way you keep intact all your source codes and all object or temporary files will be created in a separate folder. As a side, for instance, you can use Qt Creator during normal development workflow, but when, for some reason, you want to see the raw output from build tools you can build the project from command-line.

Read more