diff --git a/CMakeLists.txt b/CMakeLists.txt index eb89994ece..de49a680b6 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -168,7 +168,7 @@ if (NOT BUILD_TESTS_ONLY) set(BUILD_UNIT_TESTS OFF) endif() - if (USE_EXTERNAL_MPI) + if (USE_EXTERNAL_MPI STREQUAL "ON") if(NOT HAVE_EXTERNAL_MPI) message(FATAL_ERROR "External MPI support requested but MPI support not found. Build Aborted") endif()