I have a CMake project and I would like to exclude the generated project files from version control.
From my understanding there is no way to force CMake to use a certain build directory. The user can specify any directory they want and therefore I cant exclude it in my .gitignore. Usually the user would place it in a directory called build
inside the source directory and I would put that in .gitignore. But I had the crazy idea to call it meta_build
, which led me to this problem. Also, an inexperienced user might do an in-source build. It's just a matter of time until someone accidentally checks in the generated project files.
Any ideas or workarounds for this matter are much appreciated.