It was thinking of something within the .mod file. But one could argue that the compiler path is system dependent, and even the compiler flags could vary if the GCC version is different, so I’m not 100% sure.
@stepan-a can probably comment on this, since he is the one would requested this.
In GCC, if the same option is set twice is it the second occurrence that is used?
Can a compiler other than GCC could be used?
It seems we need one option for the path and another for the options if we can simply add them before the name of the *.c file. If not it is much more complicated because the user would need to master all the options used by default
If two options contradict each other, then it is indeed the last one that takes precedence.
We have decided to standardize on GCC, because it is distributed with the Windows package. The default options are GCC-specific; they will probably not work with Clang, and definitely not with commercial compilers.
I think it should be a separate command. Since we now distribute a compiler, we will be able to compile .mex files, tailored to the user's model, on the fly.
We should be able to replace all flags or add flags to the default configuration.