We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent eaac6b7 commit 60a1dc0Copy full SHA for 60a1dc0
cmake/mpi.cmake
@@ -1,18 +1,8 @@
1
-find_package(MPI REQUIRED)
+find_package(MPI REQUIRED COMPONENTS CXX)
2
if(NOT MPI_FOUND)
3
message(FATAL_ERROR "MPI NOT FOUND")
4
endif()
5
6
function(ppc_link_mpi exec_func_lib)
7
- if(MPI_COMPILE_FLAGS)
8
- set_target_properties(${exec_func_lib} PROPERTIES COMPILE_FLAGS
9
- "${MPI_COMPILE_FLAGS}")
10
- endif(MPI_COMPILE_FLAGS)
11
-
12
- if(MPI_LINK_FLAGS)
13
- set_target_properties(${exec_func_lib} PROPERTIES LINK_FLAGS
14
- "${MPI_LINK_FLAGS}")
15
- endif(MPI_LINK_FLAGS)
16
- target_include_directories(${exec_func_lib} PUBLIC ${MPI_INCLUDE_PATH})
17
- target_link_libraries(${exec_func_lib} PUBLIC ${MPI_LIBRARIES})
+ target_link_libraries(${exec_func_lib} PUBLIC MPI::MPI_CXX)
18
endfunction()
0 commit comments