I want to check if the given CMAKE_CXX_COMPILER has mpi support builtin, such as mpicc, with which there is no need to add include path or link library manually.
I used if(CMAKE_CXX_COMPILER MATCHES "mpi") before. However, I just find that intel’s new compiler has the location /opt/intel/oneapi/compiler/latest/linux/bin/icx, which matches string “mpi” in “compiler”, but does not have mpi builtin.
So I want to know what is the standard to way to detect it.