Skip to content

Commit 79a03af

Browse files
committed
Small fix for MSVC build
MPI::MPI_C was part of the add_library(scalapack <sources>) line, instead of the target_link_libraries(scalapack <libraries>) line. This resulted in cmake errors with MSVC compilers.
1 parent e1faf8f commit 79a03af

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,11 +247,11 @@ if (NOT MSVC)
247247
scalapack_install_library(scalapack)
248248
else () # Need to separate Fortran and C Code
249249
OPTION(BUILD_SHARED_LIBS "Build shared libraries" ON )
250-
add_library(scalapack ${blacs} ${tools-C} ${pblas} ${ptools} ${redist} ${src-C} MPI::MPI_C)
250+
add_library(scalapack ${blacs} ${tools-C} ${pblas} ${ptools} ${redist} ${src-C})
251251
set_target_properties(scalapack PROPERTIES
252252
VERSION ${SCALAPACK_VERSION}
253253
SOVERSION ${SCALAPACK_VERSION_MAJOR}.${SCALAPACK_VERSION_MINOR})
254-
target_link_libraries( scalapack ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES})
254+
target_link_libraries( scalapack ${LAPACK_LIBRARIES} ${BLAS_LIBRARIES} MPI::MPI_C)
255255
add_library(scalapack-F ${pblas-F} ${pbblas} ${ptzblas} ${tools} ${src} ${extra_lapack} )
256256
set_target_properties(scalapack-F PROPERTIES
257257
VERSION ${SCALAPACK_VERSION}

0 commit comments

Comments
 (0)