Commit 00d8f84d authored by BRAMAS Berenger's avatar BRAMAS Berenger

Update the cmake to compile mpi program.

parent 04108166
......@@ -6,11 +6,14 @@ if(insource)
MESSAGE(FATAL_ERROR "${PROJECT_NAME} requires an out of source build. Goto ./Build and tapes cmake ../")
endif(insource)
# MPI option has to be set before project
OPTION( SCALFMM_USE_MPI "Set to ON to build ScaFMM with MPI" OFF )
# MPI option has to be set before project, cannot be changed in the cache!
if( SCALFMM_USE_MPI )
SET(CMAKE_CXX_COMPILER mpicxx)
endif()
include(CMakeForceCompiler)
CMAKE_FORCE_C_COMPILER(mpicc "MPI C Compiler")
CMAKE_FORCE_CXX_COMPILER(mpicxx "MPI C++ Compiler")
else()
MESSAGE(STATUS "Remove CMake cache and run cmake .. -DSCALFMM_USE_MPI=ON to enable MPI" )
endif(SCALFMM_USE_MPI)
# Project Infos
project(scalfmm)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment