
Robert Ramey
On 6/2/16 6:52 PM, Gavin Lambert wrote:
2. Use some other directory as the cmake output directory. I always put the build outside the whole tree. I thought everyone did and I thought that's was the normal/recommended/customary practice when using CMake.
I always assumed that "out of source build" meant that all the products were in their own separate directory, (i.e. root/build/), but not necessarily meaning that the directory was out of the source tree (i.e. root/../build). I think the goal is to not end up with .o files alongside .cpp files, nothing more, but I could be mistaken. Using root/../build is cumbersome because the build directory will conflict if you have many different projects. Imagine for example /home/ldionne/code/ project1/ build/ <-- build tree for project1 project2/ build/ <-- can't be called build Instead, I like to have /home/ldionne/code/ project1/ build/ project2/ build/ ... and so on Just my preference. Louis