Un-gitignore CMakeCache.txt

I just lost a stupid amount of time to https://github.com/apple/swift/pull/84. Any objections to me pulling it out, so CMakeCache.txt shows up in git status by default? Individuals who want to do in-source-tree builds can still add it to their local .git/info/exclude. (I haven't seen the original contributor of that PR around in a while either.)

The reason that is in .gitignore is to prevent it from being committed I believe. We don't want to allow it to be committed. Most projects disallow in-source builds, and CMake recommends against it. Why don't we just enforce that?

Given that all our stuff goes through code review these days, it seems unlikely that a CMakeCache.txt would slip in.

I don't love breaking people's workflows, but just banning it entirely would work for me too. I suppose we could also ban it unless you pass an extra flag.

I generally dislike breaking people's workflows as well, but, in this case, this is something which CMake strongly recommends against, as do most other build systems. I think that in this case, this is adopting industry best practices rather than limiting developers.

2 Likes

Lets ban it! = p.

Terms of Service

Privacy Policy

Cookie Policy