I'm building a library called gtkmm (using MSVC). For anyone who doesn't know gtkmm, along with its counterparts (such as glibmm) it's a bit like a cross-platform version of MFC.

Anyone who does know gtkmm will know that most of its source files get auto-generated at compile time. I don't quite understand the reasoning behind this but it's a common practice when building cross-platform libraries. Maybe it permits each source file to be customized, according to the target OS. I don't know. The key thing is that a LOT of files get auto-generated. A typical line for auto-generating one specific file set might look something like this:-

Code:
perl -I$(GlibmmBuildRootFolder)/tools/pm $(GlibmmBuildRootFolder)/tools/gmmproc -I ../../tools/m4 -I $(GlibmmBuildRootFolder)/tools/m4 -I $(AtkmmBuildRootFolder)/codegen/m4 -I $(PangommBuildRootFolder)/tools/m4  --defs . accelgroup . ../gtkmm
Currently I add that line to MSVC's 'Pre-build Events' and it results in two files getting generated:- accelgroup.cc and accelgroup.h. So far, so good.

The problem is that there are literally hundreds of such lines for the whole project. Each line gets executed as an individual command but I can only add around 80 of them to my Pre-build Events. After that, the dialog window simply won't accept any more. Presumably another case of somebody at Microsoft deciding that 80 commands should be enough for anybody...

Can anyone suggest a way to increase the capacity? I thought of two things:- (1) move everything into an external file and simply run the external file. (2) Create some sub-projects that need to get built as dependencies of my main project (i.e. the sub-projects would each handle 80 commands of their own). Option 2 might be the best approach because as things stand, MSVC's output window gives me some feedback so I can see if any of the commands fails. I'm not sure if that would still happen if I delegated building to a separate file.

I just wondered if anyone's got any further suggestions? For example would a custom build step help here? I'm not sure if custom build steps are similarly restricted. Nor do I know where they get executed. I'd need the step to get executed before any compilation begins. Any ideas anyone?