"feenableexcept" is undefined during compilation with Intel

Brief description of tools/files: Intel icc/icpc oneapi compiler

I am trying to compile with icc but I get this message below despite cmake finding feenableexcept and fedisableexcept. I did not get these errors with clang or GNU gcc.

-- Looking for feenableexcept in m
-- Looking for feenableexcept in m - found
-- Looking for fedisableexcept in m
-- Looking for fedisableexcept in m - found

Here is the error:

/Users/brian/tools/gromacs-2021.4/src/gromacs/math/utilities.cpp(96): error: identifier "feenableexcept" is undefined
      return feenableexcept(c_FPexceptions);
             ^

/Users/brian/tools/gromacs-2021.4/src/gromacs/math/utilities.cpp(125): error: identifier "fedisableexcept" is undefined
      return fedisableexcept(c_FPexceptions);
             ^

Here is my cmake command:

CFLAGS="-syslibroot /Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/usr/lib  -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk -L/opt/intel/oneapi/ipp/latest/lib -I/opt/intel/oneapi/ipp/latest/include -MMD -MF -MP -lz -std=99 -lboost" 
CXXFLAGS="-syslibroot /Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/usr/lib -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk -L/opt/intel/oneapi/ipp/latest/lib -I/opt/intel/oneapi/ipp/latest/include -MMD -MF -MP -lz -std=99 -lboost" 
cmake .. -DGMX_FFT_LIBRARY=mkl \
      -DMKL_LIBRARIES="/opt/intel/oneapi/mkl/2021.4.0/lib" \
      -DMKL_INCLUDE_DIR="/opt/intel/oneapi/mkl/2021.4.0/include" \
      -DCMAKE_C_COMPILER=icc \
      -DCMAKE_CXX_COMPILER=icpc \
      -DCMAKE_OSX_SYSROOT=/Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk \
      -DCMAKE_OSX_DEPLOYMENT_TARGET=/Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk \
      -DGMX_USE_TNG=OFF 
      -DZLIB_LIBRARY=/Library/Developer/CommandLineTools/SDKs/MacOSX11.3.sdk/usr/lib

I fixed this issue but now building with my own FFWD library of MacOS is proving difficult since I only have these files after compiling FFWD:

/usr/local/lib/libfftw3.3.dylib         /usr/local/lib/libfftw3_omp.dylib
/usr/local/lib/libfftw3.a               /usr/local/lib/libfftw3_omp.la
/usr/local/lib/libfftw3.dylib           /usr/local/lib/libfftw3_threads.3.dylib
/usr/local/lib/libfftw3.la              /usr/local/lib/libfftw3_threads.a
/usr/local/lib/libfftw3_omp.3.dylib     /usr/local/lib/libfftw3_threads.dylib
/usr/local/lib/libfftw3_omp.a           /usr/local/lib/libfftw3_threads.la

So not sure what to do since I get these errors:

-- Looking for fftwf_plan_many_dft in /usr/local/lib/libfftw3.a
-- Looking for fftwf_plan_many_dft in /usr/local/lib/libfftw3.a - not found
-- Looking for fftwf_plan_many_dft_r2c in /usr/local/lib/libfftw3.a
-- Looking for fftwf_plan_many_dft_r2c in /usr/local/lib/libfftw3.a - not found
-- Looking for fftwf_plan_many_dft_c2r in /usr/local/lib/libfftw3.a
-- Looking for fftwf_plan_many_dft_c2r in /usr/local/lib/libfftw3.a - not found
CMake Error at cmake/FindFFTW.cmake:106 (message):
  Could not find fftwf_plan_many_[r2c|c2r] in /usr/local/lib/libfftw3.a, take
  a look at the error message in
  /Users/brian/tools/gromacs-2021.4/build_intel4/CMakeFiles/CMakeError.log to
  find out what went wrong.  If you are using a static lib (.a) make sure you
  have specified all dependencies of fftw3f in FFTWF_LIBRARY by hand (e.g.
  -DFFTWF_LIBRARY='/path/to/libfftw3f.so;/path/to/libm.so') !
Call Stack (most recent call first):
  cmake/gmxManageFFTLibraries.cmake:88 (find_package)
  CMakeLists.txt:699 (include)

I am getting a little confused w.r.t. why is my CMake looking for float-precision fftw ( see the f after …tw in “Could not find fftwf”, make sure you have specified all dependencies of fftw3f in FFTWF_LIBRARY by hand (e.g.
-DFFTWF_LIBRARY=’/path/to/libfftw3f.so’) when I specifically compiled fftw with double-precision. What CMake parameter do I have to give for GROMACS double-precision?

OMG

-DGMX_DOUBLE=on