[CMake] cleaning targets

Bill Hoffman bill.hoffman at kitware.com
Thu Nov 6 13:09:16 EST 2008

Tyler Roscoe wrote:

> I have everything in a build/ subdirectory, but that includes
> CMakeLists.txt (I'm trying to keep the root of all my projects as clean
> as possible, with source in src/ and utility scripts in util/ and all
> the build stuff in build/).

You should still not be building in the directory with the 
CMakeLists.txt files.

Something like this should work:

cd build-linux
cmake ../build

To clean, you just:
rm -rf * build-linux

Although supported in-source builds are considered bad in CMake.


More information about the CMake mailing list