On Thu, Oct 21, 2010 at 16:52, M. Scot Breitenfeld <brtn...@uiuc.edu> wrote:
>  It was part of a section detecting if mpi is present, if it is then it uses
> the mpi** compiler wrappers instead:
>
> IF ( MPI_FOUND )
>  SET (CMAKE_Fortran_COMPILER  mpif90)
>  SET (CMAKE_CC_COMPILER  mpicc)

This is a typo, should be CMAKE_C_COMPILER.

>  SET (CMAKE_CXX_COMPILER  mpicxx)
> ENDIF()

This approach is horribly non-portable, many systems do not have
wrapper compilers or they have different names.  An easy solution is
for the user to set CMAKE_C_COMPILER themselves, as in cmake
-DCMAKE_C_COMPILER=/path/to/mpicc.  You can also use FindMPI.cmake
(which needs love, it's broken in many batch environments) to
determine the flags needed to compile and link using the unwrapped
compiler.

Jed
_______________________________________________
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

Reply via email to