diff --git a/tools/toolchain/scripts/generate_cmake_options.sh b/tools/toolchain/scripts/generate_cmake_options.sh index 3d5e48dc51..410f00a48d 100755 --- a/tools/toolchain/scripts/generate_cmake_options.sh +++ b/tools/toolchain/scripts/generate_cmake_options.sh @@ -35,6 +35,9 @@ else # If MPI is used, set "CP2K_USE_MPI" to "ON" if [ "${MPI_MODE}" != "no" ]; then CMAKE_OPTIONS="${CMAKE_OPTIONS} -DCP2K_USE_MPI=ON" + if [ -n $(grep "IF_MPI(-D__MPI_F08|)" "${INSTALLDIR}"/toolchain.conf) ]; then + CMAKE_OPTIONS="${CMAKE_OPTIONS} -DCP2K_USE_MPI_F08=ON" + fi fi # If GPU acceleration is used, add the option about GPU acceleration if [ "${ENABLE_CUDA}" = "__TRUE__" ]; then