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

Moved add_dune_<package>_flags functions out of the

Find<Package>.cmake modules, as they were missing with set
CMAKE_DISABLE_<Package>=TRUE.

Now they are in speparte modules Add<Package>Flags and thus can be
used as exspected with disabled packages.

[[Imported from SVN: r1926]]
parent 51558615
No related branches found
No related tags found
No related merge requests found
#
# Module providing convenience methods for compile binaries with SuperLU support.
#
# Provides the following functions:
#
# add_dune_superlu_flags(target1 target2 ...)
#
# adds SuperLU flags to the targets for compilation and linking
#
function(add_dune_superlu_flags _targets)
if(SUPERLU_FOUND)
foreach(_target ${_targets})
target_link_libraries(${_target} ${SUPERLU_DUNE_LIBRARIES})
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})
endif(SUPERLU_FOUND)
endfunction(add_dune_superlu_flags)
find_package(BoostFusion)
find_package(ParMETIS)
include(AddParMETISFlags)
find_package(SuperLU)
include(AddSuperLUFlags)
......@@ -15,19 +15,6 @@
# SUPERLU_LIBRARIES Name to the SuperLU library.
#
# adds SuperLU flags to the targets
function(add_dune_superlu_flags _targets)
if(SUPERLU_FOUND)
foreach(_target ${_targets})
target_link_libraries(${_target} ${SUPERLU_DUNE_LIBRARIES})
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})
endif(SUPERLU_FOUND)
endfunction(add_dune_superlu_flags)
# look for BLAS
find_package(BLAS QUIET REQUIRED)
if(NOT BLAS_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