Add component OpenMP for MUMPS to compile with multithreading
I had an issue when compiling MaPHyS with multithreading + MUMPS on OCCIGEN: impossible to find MUMPS. The MUMPS test could not find (and link) the OpenMP library. I added OpenMP as a MUMPS component so that FindMUMPS could use a FindOpenMP and link correctly the MUMPS test. It worked fine to compile MaPHyS.
Merge request reports
Activity
I guess it should. I am actually looking for OpenMP link flag. After some googling I found that FindOpenMP does not retrurn one before cmake 3.9. So the hack is to use the compiler flag as the link flag... A modern version (cmake >= 3.9) would be something like:
list(APPEND REQUIRED_FLAGS "${OpenMP_Fortran_FLAGS}")
list(APPEND REQUIRED_LDFLAGS "${OpenMP_Fortran_LIB_NAMES}")
PS: also the Fortran flag is only available after cmake 3.7
mentioned in issue #12 (closed)