On 02/08/2016 10:35 AM, Alin Marin Elena wrote: > I was playing to day with FeatureSummary and Fortran and I discovered the two > do not like each other too much . While MPI is obviously found in here... > Feature summary claims it did not > > -- Found MPI_Fortran: /opt/openmpi/gcc/1.10.1/lib64/libmpi_usempif08.so;/opt/ > openmpi/gcc/1.10.1/lib64/libmpi_usempi_ignore_tkr.so;/opt/openmpi/gcc/1.10.1/ > lib64/libmpi_mpifh.so;/opt/openmpi/gcc/1.10.1/lib64/libmpi.so
Technically it was "MPI_Fortran" that was found. It looks like FindMPI distinguishes each of the languages as a kind of sub-package: https://cmake.org/gitweb?p=cmake.git;a=blob;f=Modules/FindMPI.cmake;hb=v3.4.3#l14 This is different from most other find modules because the results need to be language-specific. The actual MPI_FOUND variable is set only based on MPI_CXX_FOUND or MPI_C_FOUND for compatibility with when there was no language distinction: https://cmake.org/gitweb?p=cmake.git;a=blob;f=Modules/FindMPI.cmake;hb=v3.4.3#l620 I think MPI_Fortran_FOUND was left out of that because there was no support for Fortran MPI originally and this language distinction was added as part of adding support for Fortran. I was not involved with that development process myself so I do not know for sure. One could look at updating the code to treat setting MPI_FOUND as an official result (as needed by find_package with REQUIRED) rather than only for compatibility. This would mean reconciling MPI_C_FOUND, MPI_CXX_FOUND, and MPI_Fortran_FOUND. I'm not sure the proper approach because we do not know which languages the caller actually needs. -Brad -- Powered by www.kitware.com Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Kitware offers various services to support the CMake community. For more information on each offering, please visit: CMake Support: http://cmake.org/cmake/help/support.html CMake Consulting: http://cmake.org/cmake/help/consulting.html CMake Training Courses: http://cmake.org/cmake/help/training.html Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Follow this link to subscribe/unsubscribe: http://public.kitware.com/mailman/listinfo/cmake-developers