diff --git a/CMakeLists.txt b/CMakeLists.txt index 10e9082d..7cc3fdab 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -173,10 +173,16 @@ if(BUILD_TESTS) list(APPEND UNIT_TESTS_RELATIVE ${_testPath}) endforeach() + if(MPI) + set(MAX_PES_OPTION MAX_PES 1) + else() + set(MAX_PES_OPTION "") + endif() + add_pfunit_ctest(unitTests TEST_SOURCES ${UNIT_TESTS_RELATIVE} LINK_LIBRARIES scone - MAX_PES 1 + ${MAX_PES_OPTION} ) # pFUnit may have a bug which causes a unused variable `class(Test), allocatable :: t` be