Skip to content
Snippets Groups Projects
Commit 5428892a authored by Markus Blatt's avatar Markus Blatt
Browse files

Allow specification of multiple targets.

[[Imported from SVN: r6667]]
parent 48abf440
No related branches found
No related tags found
No related merge requests found
......@@ -27,14 +27,15 @@ if(MPI_FOUND)
endif(MPI_FOUND)
# A macro that adds the MPI flags for the compilation
function(add_dune_mpi_flags _target)
function(add_dune_mpi_flags _targets)
if(MPI_FOUND)
foreach(_target ${_targets})
target_link_libraries(${_target} ${MPI_DUNE_LIBRARIES})
# The definitions are a hack as we do not seem to know which MPI implementation was
# found.
SET_TARGET_PROPERTIES(${_target} PROPERTIES COMPILE_FLAGS ${MPI_DUNE_COMPILE_FLAGS}
"-DENABLE_MPI=1 -DMPICH_SKIP_MPICXX -DMPIPP_H")
SET_TARGET_PROPERTIES(${_target} PROPERTIES LINK_FLAGS ${MPI_DUNE_LINK_FLAGS} "")
#SET_TARGET_PROPERTIES(indicestest PROPERTIES INCLUDE_PATH ${MPI_CC_INCLUDE_PATH})
endforeach(_target ${_targets})
endif(MPI_FOUND)
endfunction()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment