diff --git a/SimpleTests/MeshTests/MPI/CMakeLists.txt b/SimpleTests/MeshTests/MPI/CMakeLists.txt index 09358edbc3309be865df0a3e7edb6280036e15d2..d860bec2028ec88c6f5b15becd2353d8b11584cd 100644 --- a/SimpleTests/MeshTests/MPI/CMakeLists.txt +++ b/SimpleTests/MeshTests/MPI/CMakeLists.txt @@ -13,7 +13,7 @@ if(OGS_USE_PETSC) endif() if(OGS_USE_MPI) - target_link_libraries(test_node_partitioned_mesh ${MPI_CXX_LIBRARIES}) + target_link_libraries(test_node_partitioned_mesh MPI::MPI_CXX) endif() AddTest( diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt index bd6f4f0e773ae87acfbf008216ebf0a7c2fe978c..41f20990209c270754d06fd9774193af48aba5c8 100644 --- a/Tests/CMakeLists.txt +++ b/Tests/CMakeLists.txt @@ -58,7 +58,7 @@ if(OGS_USE_PETSC) endif() if(OGS_USE_MPI) - target_link_libraries(testrunner ${MPI_CXX_LIBRARIES}) + target_link_libraries(testrunner MPI::MPI_CXX) endif() if(OGS_BUILD_SWMM) diff --git a/scripts/cmake/Find.cmake b/scripts/cmake/Find.cmake index f64f1685eccb5f11d8ed7383e2bfa7ff8ed05048..064a7ccfdde49870e3e27a4e33a6ef1102b8daef 100644 --- a/scripts/cmake/Find.cmake +++ b/scripts/cmake/Find.cmake @@ -148,7 +148,6 @@ find_package(OpenSSL) ## Check MPI package if(OGS_USE_MPI) find_package(MPI REQUIRED) - include_directories(SYSTEM ${MPI_CXX_INCLUDE_PATH}) endif() find_package(Shapelib)