Don't pass options to disable C++ warnings to add_definitions as these options are sent to the Fortran compiler too causing even more warnings. Add them to CMAKE_CXX_FLAGS instead.