title: How to compile an MPI included c program using cmake
body: <p>I am trying to apply openmp and mpi techniques to an open source C program which requires "cmake . &amp;&amp; make" to be built. I already found at <a href="https://stackoverflow.com/questions/12399422/how-to-set-linker-flags-for-openmp-in-cmakes-try-compile-function">How to set linker flags for OpenMP in CMake&#39;s try_compile function</a> how to include the -fopenmp flags but still confused about mpi. What can I do about that?</p>