Compile mfix 18.1.5 in dmp with debug mode

On our cluster I compile mfix.18.1.5 for DMP with

build_mfixsolver --batch --dmp FC=mpiifort -DMPI_Fortran_COMPILER=mpiifort

what changes should I make to have the built in full debug mode to tell me in what subroutine mfix crashes?
I tried this:

build_mfixsolver --batch --dmp FC=mpiifort -DMPI_Fortran_COMPILER=mpiifort -DCMAKE_Fortran_FLAGS="-O3 -g"

but did not seem to work.



To add runtime checking for the Intel Fortran compiler, use:

build_mfixsolver --batch --dmp FC=mpiifort -DMPI_Fortran_COMPILER=mpiifort -DCMAKE_Fortran_FLAGS="-O3 -g -check=all"

(For GFortran it would be -fcheck=all)

Thank you. It states:
ifort: command line warning #10158: ignoring option ‘-check’; argument must be separate

Looks like you should use -C or -check all