Currently my project structure looks like this:
-
project
- .git
- include
- source
- test
and I want to add a "build" directory to it, so that people know where to build with cmake.
I want the build directory to be empty, so in my .gitignore I added:
build/*
so that it ignores everything in that directory.
The problem is that git also doesn't track the directory because its empty. So I tried adding a README.txt (containing "build cmake solutions here") to make it so that git would track it, (And I edited the .gitignore file, obviously) but, unfortunately, that seem to mess up cmake.
When I try to build on windows using the cmake gui and choose the build directory, it doesn't generate the visual studio solution, but when I remove the README.txt file from the folder, cmake works again.
I'm guessing it's because cmake doesn't allow any other files in the build directory.
So I cant have the README.txt file in the folder because it messes up cmake for some reason, but I also can't leave the directory empty because that will make git stop tracking it....
So what do I do?