For our project, we are building certain source files with different compiler settings. For example, we would enable different vector extensions (SSE4, AVX, AVX2, AVX512) for different files and dispatch at runtime. In some cases, we also would like to build certain files with a different specialized compiler, like ICC, ISPC, Rust, etc.
This does not seem to be supported by the current version of Projucer. So I would like to propose a feature that adds this useful extra flexibility.
The following describes a possible realization in Projucer.
In the File Explorer folder view, an extra selector for a ‘build setting’ is added for each file that is going to be compiled. The build settings are named and can be added globally, possibly from this view with a plus-button near the file list.
The build settings are defined in the individual exporter modules. A new property editor appears for each build setting, allowing to select different build styles. The possible selections are “build with extra flags” or “build with non-standard compiler”, followed by a text box for the specifics. Certain environment variables could be made available for the strings entered there to make it easy to refer to the default compiler and default Projucer build flags, etc.
I think all target project formats supported allow for custom build rules and per-file flags, so the support of the exporter should be relatively straightforward.
Please let me know if I have overlooked something obvious!