Skip to content
Snippets Groups Projects
Commit 0beab99f authored by Ansgar Burchardt's avatar Ansgar Burchardt Committed by Christoph Grüninger
Browse files

[CMake] add_dune_superlu_flags: Add OBJECT parameter

parent 1fdbfda2
No related branches found
No related tags found
No related merge requests found
......@@ -7,15 +7,18 @@
#
# adds SuperLU flags to the targets for compilation and linking
#
function(add_dune_superlu_flags _targets)
function(add_dune_superlu_flags)
if(SUPERLU_FOUND)
foreach(_target ${_targets})
target_link_libraries(${_target} ${SUPERLU_DUNE_LIBRARIES})
cmake_parse_arguments(_add_superlu "OBJECT" "" "" ${ARGN})
foreach(_target ${_add_superlu_UNPARSED_ARGUMENTS})
if(NOT _add_superlu_OBJECT)
target_link_libraries(${_target} ${SUPERLU_DUNE_LIBRARIES})
endif()
get_target_property(_props ${_target} COMPILE_FLAGS)
string(REPLACE "_props-NOTFOUND" "" _props "${_props}")
set_target_properties(${_target} PROPERTIES COMPILE_FLAGS
"${_props} ${SUPERLU_DUNE_COMPILE_FLAGS} -DENABLE_SUPERLU=1")
endforeach(_target ${_targets})
endforeach()
endif(SUPERLU_FOUND)
endfunction(add_dune_superlu_flags)
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