[CMake] MPI Module

Robert Kubrick robertkubrick at gmail.com
Mon Sep 8 17:12:44 EDT 2008


Nope. I removed the force compiler lines from CMakeLists.txt and set  
CXX to mpicxx but the Makefile invokes g++.

On Sep 8, 2008, at 5:08 PM, Alexander Neundorf wrote:

> On Monday 08 September 2008, Robert Kubrick wrote:
>> I'm having some problems with the MPI module:
>>
>> #
>> # MPI
>> #
>> FIND_PACKAGE(MPI REQUIRED)
>> INCLUDE(CMakeForceCompiler)
>> CMAKE_FORCE_CXX_COMPILER(mpicxx "MPI C++ Compiler")
>>
>> The code above works. It invokes the mpicc wrapper to compile my MPI
>> project. However I figured there must be a simpler way to run mpicc
>> without using the ForceCompiler module? If I don't force the
>> compiler, the generated makefile invokes my default compiler, g++.
>
> You can set the CC and CXX environment variables before running  
> cmake to the
> mpi variant.
> Does this work for you ?
>
> Alex
> _______________________________________________
> CMake mailing list
> CMake at cmake.org
> http://www.cmake.org/mailman/listinfo/cmake



More information about the CMake mailing list