out-of-source

Proper way to get an out-of source build in multi-part cmake project.

I use cmake to build, test and install my project. My way is a little crude: I use a scripts like this to get an out-of-source build: DIR=debug_build && rm -fr ./${DIR} && mkdir -p ${DIR} && cd ${DIR} && cmake -D CMAKE_BUILD_TYPE=Debug $@ .. && make I guess I could at least put it into makefile, but isnt it strange to use Makefile to ...

Out of source build with scons?

I have been using cmake to build my projects out of source, which is really convenient as you avoid polluting your source directory with unnecessary files. Assuming the CMakeLists.txt is in the current directory, this could be done as follows: mkdir build cd build cmake .. make How can I do the same in scons? ...