From a23a6c59283bedc3e5215857a8d14c92343903e5 Mon Sep 17 00:00:00 2001 From: Paul Romano Date: Thu, 16 Mar 2023 09:26:23 -0500 Subject: [PATCH] Improve error message when parallel HDF5 is found but MPI not enabled --- CMakeLists.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 11ae71ac65d..0dcaa6fb374 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -156,9 +156,9 @@ endif() find_package(HDF5 REQUIRED COMPONENTS C HL) if(HDF5_IS_PARALLEL) if(NOT OPENMC_USE_MPI) - message(FATAL_ERROR "Parallel HDF5 was detected, but the detected compiler,\ - ${CMAKE_CXX_COMPILER}, does not support MPI. An MPI-capable compiler must \ - be used with parallel HDF5.") + message(FATAL_ERROR "Parallel HDF5 was detected, but MPI was not enabled.\ + To use parallel HDF5, OpenMC needs to be built with MPI support by passing\ + -DOPENMC_USE_MPI=ON when calling cmake.") endif() message(STATUS "Using parallel HDF5") endif()