[CMake] MPI Compilers

Tim Gallagher tim.gallagher at gatech.edu
Wed Jul 6 12:41:56 EDT 2011


Along similar lines, we have it currently working with:

  find_package(MPI REQUIRED)
    include(CMakeForceCompiler)
    CMAKE_FORCE_C_COMPILER(mpicc ${CMAKE_C_COMPILER_ID})
    CMAKE_FORCE_CXX_COMPILER(mpicxx ${CMAKE_CXX_COMPILER_ID})
    CMAKE_FORCE_Fortran_COMPILER(mpif90 ${CMAKE_Fortran_COMPILER_ID})

Which works, but I can't find where the compile flags are coming from. It's not using CMAKE_Fortran_FLAGS_*, but it does change it's flags based on the build type. Anybody have any idea how to set the flags?

Tim

----- Original Message -----
From: "Tim Gallagher" <tim.gallagher at gatech.edu>
To: cmake at cmake.org
Sent: Wednesday, July 6, 2011 12:31:49 PM
Subject: [CMake] MPI Compilers

Hi,

How do we tell the project to use the compilers found by FindMPI? On the master branch, FindMPI has been modified to create MPI_<LANG>_COMPILER, etc.., but how does one then specify that it should be used rather than the CMAKE_<LANG>_COMPILER?

Tim
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake


More information about the CMake mailing list