diff --git a/CMakeLists.txt b/CMakeLists.txt index 78296ee7d1fb961f5f06da93aa33969756cf9e80..f08fa4cc9cb9d596407cb56f0e876f62a35957e6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -23,6 +23,7 @@ option(INSTALL_WITH_RPATH "RPATH the build dependencies for e.g dlb into the sha # Other options option(WITH_MPI "Compile with MPI" OFF) +option(WITH_MPI_TESTS "Add MPI Tests. Requires mpirun to be working" ON) if(BUILD_C_FORTRAN) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index d99da70a6b481cd07bf65e08e42b0e166d155464..384053429942e9a7ca5d6aae9b6b43be418d5862 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -35,7 +35,7 @@ add_test(NAME TestCppTalpTree COMMAND TestCppTalpTree) - if(WITH_MPI) + if(WITH_MPI AND WITH_MPI_TESTS) add_executable(TestCppTalpTreeMPI cpp/TestCppTalpTreeMPI.cpp) target_link_libraries(TestCppTalpTreeMPI nesmik::nesmik MPI::MPI_CXX)