Bug #13274 2008-03-04 23:56
uol
Compiling non c++ files for with multiple build targets
Setup:
Host: FreeBSD, OpenSuse 10.3
Build Targets: FreeBSD, Linux, Linux with cross compiling, using 4 different compilers (host=target, and 3 cross compilers).
Project: Static Lib with CORBA idl files, followed wiki
documentation with title "Adding support for non C/C++ files to the build system".
All works very well, but:
Questionable feature (Bug or not?):
The non-C++-Compiler, here the CORBA IDL compiler has to be configured for every C++-Compiler that gets used by the build targets.
That by itself might be ok and reasonable for some other non-C++-Stuff that could be target platform / C++-Compiler dependent, but apparently leads to
Bug:
If the IDL gets compiled, it always is compiled as often as the IDL compiler had to be configured (in this case 4 times because I'm using 4 different compilers).
Reasonable behaviour would be to compile it once, with the non c++-compiler setting configured for the particular c++-compiler for the just active build target.
- Category
- Compiler
- Group
- Status
- Open
- Close date
- Assigned to
History
cbproject.cpp: loop
for (std::map<Compiler*, const CompilerTool*>::const_iterator it = GenFilesHackMap.begin(); it != GenFilesHackMap.end(); ++it)
at the end of AddFile():
This loop adds the generated file as often as the tool for this extension is found (and stored in GenFilesHackMap).
For my project it works to execute this loop only once because each tool has the same definition.
Would it help to add the generated file for the specific target index (and not with -1) for which the compiler tool in GenFilesHackMap has been defined?
Or is this more complicated?