Thanks for the suggestion.
Initially I started with parsing and generating custom wxFB project files. But C::B was refusing to add it. Thus I dropped the idea. See more details on the following thread.
http://forums.codeblocks.org/index.php?topic=4768.msg40734#msg40734
I've not looked into the issue yet. Once we figure this out, I'll make necessary changes.
Currently, few more MB of pch file will be generated with BCC and VC.
But I'm not quite sure whether that will solve the problem or not.
AFAIK, compiler will expect similar headers across all the cpp files to create the pch file. Once you issue the following command, BCC will be in trouble. Following code will tell BCC to create a PCH file without any header includes which may create utter confusion for the compiler and most probably will fail to compile.
#ifdef __BORLANDC__
#pragma hdrstop
#endif //__BORLANDC__
#ifndef WX_PRECOMP
#include <wx/wx.h>
#endif //WX_PRECOMP
The best solution is to use,
<wx/wxprec.h> across all the files but this will limit fine tuning if necessary. There will be another problem with GCC in this case. GCC requires
<wx/wxprec.h> and
<wx/wxprec.h.gch> to be at the same folder or the folder name containing *.gch file to be matching to compile.
This could create problems with C::B. C::B would then require this file to be added as a part of the project.
So you can see I'm also confused.