Re: [pygccxml-development] Precompiled Headers
Brought to you by:
mbaas,
roman_yakovenko
From: Roman Y. <rom...@gm...> - 2007-12-05 21:01:22
|
On Dec 5, 2007 8:19 PM, Aron Bierbaum <aro...@gm...> wrote: > I am using pyplusplus to generate bindings for large project and > rather than running gccxml on all headers I have created one large > header that includes the rest of them. This header is a prime > candidate for begin a precompiled header. I am running into an issue > where I can not get pyplusplus to place this file at the top of each > file when calling mb.split_module(). Is there currently a way that I > can get this behavior? Otherwise I have attached a patch that adds > another parameter to split_module that allows the user to specify a > list of pre-compiled headers to place at the start of all generated > files. pre-compiled headers is a problem I cannot find good solution :-(. I prefer to reject the patch and provide you with relatively simple solution, using low-level API: from pyplusplus import code_creators mb = module_builder_t( ... ) mb.build_code_creator( ... ) precompiled_header = code_creators.include_t( 'your file name' ) mb.code_creator.adopt_creator( precompiled_header, 0 ) This should do the work. You need latest versions of Py++ and pygccxml, or you can just modify multiple_files.py and class_multiple_files.py files as explained. Both files contains next line: source_code.append( self.create_include_code( creators, head_headers ) ) You should change it to : source_code.append( self.create_include_code( creators, tail_headers=head_headers ) ) HTH -- Roman Yakovenko C++ Python language binding http://www.language-binding.net/ |