As explained there, you can’t easily change the flags because homebrew ships the ROOT binaries already built with certain flags.
Maybe it’s better to build ROOT from source outside homebrew in this case:
But by far the best solution would be to build math/fftw on to of an existing ROOT installation.
You just need a customized version of the CMake file, like I suggest in this PR:
Building math/fftw standalone just takes a few seconds, and if the headers are installed in your system inculde paths, then ROOT’s TVirtualFFT will pick it up and it will be just like you have installed ROOT with fftw3=ON without having to rebuild ROOT!
Let me know if you need any help with this.
Cheers,
Jonas