this is currently done in LHCb, but should be done in all projects using the LCG toolchains (as it already happens in the new lcg-toolchains).
lcg-toolchains