Add tests to ensure that altered compilation flags cause a rebuild of the compilation database
Describe the Feature Support for a compilation database was recently added. There was some discussion on discord about how it might be simplified, but the proposed simplification would have resulted in a situation where the compilation database would have been considered up-to-date even if CCFLAGS had ben changed in a way that would have altered the command line for some targets.
In order to prevent other future simplifications (of which there may well be some) from introducing regressions, we should add tests now to verify that the compilation database does indeed rebuild when needed (and, presumably, that it doesn't rebuild when it shouldn't).
Required information Discussed with @bdbaddog
- Version of SCons HEAD
Maybe recast this in terms of "compilation_db is always rebuilt. when that is changed, add tests to make sure file and action changes are both detected to trigger rebuilds" ?