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

[cmake,bugfix] Fixes adding ParMETIS flags

Previously, parmetis flags were not added as we used PARMETIS_COMPILE_FLAGS
which does not exist. This patch now sets the properties COMPILE_DEFINITIONS
and INCLUDE_DIRECTORIES for the targets and uses the correct values.
parent fef31ca5
No related branches found
No related tags found
No related merge requests found
...@@ -10,10 +10,14 @@ function(add_dune_parmetis_flags _targets) ...@@ -10,10 +10,14 @@ function(add_dune_parmetis_flags _targets)
if(PARMETIS_FOUND) if(PARMETIS_FOUND)
foreach(_target ${_targets}) foreach(_target ${_targets})
target_link_libraries(${_target} ${PARMETIS_LIBRARY} ${METIS_LIBRARY}) target_link_libraries(${_target} ${PARMETIS_LIBRARY} ${METIS_LIBRARY})
GET_TARGET_PROPERTY(_props ${_target} COMPILE_FLAGS) GET_TARGET_PROPERTY(_props ${_target} INCLUDE_DIRECTORIES)
string(REPLACE "_props-NOTFOUND" "" _props "${_props}") string(REPLACE "_props-NOTFOUND" "" _props "${_props}")
SET_TARGET_PROPERTIES(${_target} PROPERTIES COMPILE_FLAGS SET_TARGET_PROPERTIES(${_target} PROPERTIES INCLUDE_DIRECTORIES
"${_props} ${PARMETIS_COMPILE_FLAGS} -DENABLE_PARMETS=1") "${_props};${PARMETIS_INCLUDE_DIRS}")
GET_TARGET_PROPERTY(_props ${_target} COMPILE_DEFINITIONS)
string(REPLACE "_props-NOTFOUND" "" _props "${_props}")
SET_TARGET_PROPERTIES(${_target} PROPERTIES COMPILE_DEFINITIONS
"${_props};ENABLE_PARMETIS")
endforeach(_target ${_targets}) endforeach(_target ${_targets})
add_dune_mpi_flags(${_targets}) add_dune_mpi_flags(${_targets})
endif(PARMETIS_FOUND) endif(PARMETIS_FOUND)
......
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