JUCE modules: Is it possible to define a compiler flag from a module?

While currently building a module containing AVX2 instructions it would be great if including the module would also lead to automatically defining the -mavx2 compiler flag on Mac OS (haven’t looked at other platforms so far, but they will likely need some other flag?). I haven’t found any option into the modules description to set a specific compiler flag when including a module. Have I overlooked something or is this currently not possible?

It’s currently not possible to express compiler flags requirements in a module.

However, you could pre-build the files containing the AVX2 instructions into a static library and reference it using the OSXLibs setting of the module declaration.