diff --git a/CMakeLists.txt b/CMakeLists.txt index 83d94fe..246a537 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -36,8 +36,8 @@ set (CMAKE_CXX_STANDARD 11) set (CMAKE_CXX_STANDARD_REQUIRED ON) ### MPI -find_package(MPI) -if (MPI_FOUND) +if (CMAKE_ENABLE_MPI_SUPPORT) + find_package(MPI REQUIRED) set(MSWEEP_MPI_SUPPORT 1) include_directories(MPI_C_INCLUDE_DIRS) if (CMAKE_MPI_MAX_PROCESSES) diff --git a/README.md b/README.md index 3749fc2..04b68b1 100644 --- a/README.md +++ b/README.md @@ -70,7 +70,7 @@ mSWEEP with the following commands (example case for Open MPI): > mkdir build > cd build > module load mpi/openmpi -> cmake -DCMAKE_C_COMPILER=mpicc -DCMAKE_CXX_COMPILER=mpicxx .. +> cmake -DCMAKE_ENABLE_MPI_SUPPORT=1 -DCMAKE_C_COMPILER=mpicc -DCMAKE_CXX_COMPILER=mpicxx .. > make ``` diff --git a/config/CMakeLists-rcgpar.txt.in b/config/CMakeLists-rcgpar.txt.in index cbd245b..17a0759 100644 --- a/config/CMakeLists-rcgpar.txt.in +++ b/config/CMakeLists-rcgpar.txt.in @@ -5,10 +5,11 @@ include(ExternalProject) ExternalProject_Add(rcgpar-download GIT_REPOSITORY https://github.com/tmaklin/rcgpar - GIT_TAG v1.0.1 + GIT_TAG v1.0.2 SOURCE_DIR "${CMAKE_CURRENT_BINARY_DIR}/external/rcgpar" BUILD_IN_SOURCE 0 BUILD_COMMAND "" + CMAKE_ARGS -D CMAKE_ENABLE_MPI_SUPPORT=${MSWEEP_MPI_SUPPORT} INSTALL_COMMAND "" TEST_COMMAND "" UPDATE_COMMAND ""