Putting aside the specific situation and politics you are dealing with, in general, code generation is a sign that you are doing something wrong. Usually it means you are not abstracting things correctly or are trying to do the compiler's job. There is some discussion of it
Note that I don't count run-time code generation like the various method-maker modules to be the same thing, since there is no permanent code created from it.