I have a simple project that builds an executable. I need some tips on how what conventions to follow. For example, I follow the convention of creating a build/ directory in the root of my project, then in there I issue “cmake …”. Then everything is contained in that folder and can easily be cleaned if necessary.
However, this seems a bit inconvenient still. Isn’t it by most (general, i.e. not CMake developers) preferable to be able to issue “make” in the root folder?
Next I would like to have some more advanced functionality. Many build systems nowadays offer a continuous build feature using file watching. I have created a simple version myself using old school Makefile and fswatch (https://github.com/dlidstrom/Duplo/blob/master/watch.sh).
Has anyone here implemented something similar that works nicely with CMake? Considering the fact that the convention is to build everything inside a temporary directory and issuing make there, how do you combine that with a file watch script?
Any tips are greatly appreciated, thanks!