Avoid running FindGit and git process on every build, when in Developer mode: this feature is only useful for CI builds, and remove it makes the edit-and-debug cycle slightly faster. This means buildId.h contains dummy values when FG_BUILD_TYPE=Dev
Avoid the very common name ‘build.h’ in favour of something clearer and FlightGear specific.
Use a custom_target to recursively invoke Cmake at build time; this ensures the build ID and Git revision are always up to date.