Directly in the source code - no. But many projects do it, I think, as a step in the build process - the information is extracted into a temporary file that is included or passed to the compiler in a variable. At least for 'official' builds that are going to be released.
It is very useful to know what exactly version of a software you are running - especially in cases like this. The alternative way of doing that would be to make sure you manually increase a build number before every commit or so, like the Firebird project itself are doing, but this is prone to errors.