Brew install fftw

How do I install fftw using already installed gcc and open mpi?
Whenever I try to do brew install fftw, it tries to install gcc compiler and openmpi. I do not want homebrew to install gcc and open mpi since I have already built those libraries from source and are already in the path. --ignore dependencies does not seem to be available with fftw.

How do I force brew to install fftw only, without installing gcc and open mpi? I just want to use already installed gcc and open mpi!

Thanks in advance for any help!

They’re dependencies and the formula is referring to them no matter what you might have locally. The best way is to use homebrew to install your tools, or not to use homebrew at all.