Skip to content

Commit 28ffd83

Browse files
committed
Block MKL_BLACS auto-detection when cross-compiling
1 parent ffd4a06 commit 28ffd83

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

cmake/modules/FindMKL.cmake

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,11 @@ if(ENABLE_MPI)
7575

7676
string(TOLOWER "${MKL_MPI}" _mkl_mpi)
7777
if(_mkl_mpi STREQUAL "auto")
78+
if(CMAKE_CROSSCOMPILING)
79+
message(
80+
FATAL_ERROR "CMake cannot auto-determine MKL-BLACS interface correctly with cross compiling. "
81+
"Please manually pass -DMKL_MPI=<intelmpi|mpich|openmpi> flag to CMake.")
82+
endif()
7883
if("${MPI_CXX_LIBRARY_VERSION_STRING}" MATCHES "Open MPI")
7984
set(_mkl_mpi openmpi)
8085
else()

0 commit comments

Comments
 (0)