Skip to content
Snippets Groups Projects
Commit 13ed8a92 authored by Christoph Grüninger's avatar Christoph Grüninger
Browse files

[CMake]

Add HAVE_SUPERLU et al. to config.h.
Update test set up to handle SuperLU tests correctly.

[[Imported from SVN: r1615]]
parent 0b11e201
No related branches found
No related tags found
No related merge requests found
......@@ -72,7 +72,7 @@ if(SUPERLU_FOUND)
"Determing location of ${SUPERLU_WITH_VERSION} succeded:\n"
"Include directory: ${SUPERLU_INCLUDE_DIRS}\n"
"Library directory: ${SUPERLU_LIBRARIES}\n\n")
set(SUPERLU_DUNE_COMPILE_FLAGS "-I${SUPERLU_INCLUDE_DIRS} -DENABLE_SUPERLU" CACHE STRING
set(SUPERLU_DUNE_COMPILE_FLAGS "-I${SUPERLU_INCLUDE_DIRS}" CACHE STRING
"Compile flags used by DUNE when compiling SuperLU programs")
set(SUPERLU_DUNE_LIBRARIES ${SUPERLU_LIBRARIES} ${BLAS_LIBRARIES} CACHE STRING
"Libraries used by DUNE when linking SuperLU programs")
......@@ -84,6 +84,9 @@ else(SUPERLU_FOUND)
"Library directory: ${SUPERLU_LIBRARIES}\n\n")
endif(SUPERLU_FOUND)
# set HAVE_SUPERLU for config.h
set(HAVE_SUPERLU SUPERLU_FOUND)
# adds SuperLU flags to the targets
function(add_dune_superlu_flags _targets)
if(SUPERLU_FOUND)
......@@ -92,7 +95,7 @@ function(add_dune_superlu_flags _targets)
GET_TARGET_PROPERTY(_props ${_target} COMPILE_FLAGS)
string(REPLACE "_props-NOTFOUND" "" _props "${_props}")
SET_TARGET_PROPERTIES(${_target} PROPERTIES COMPILE_FLAGS
"${_props} ${PARMETIS_COMPILE_FLAGS} -DENABLE_SUPERLU=1")
"${_props} ${SUPERLU_DUNE_COMPILE_FLAGS} -DENABLE_SUPERLU=1")
endforeach(_target ${_targets})
endif(SUPERLU_FOUND)
endfunction(add_dune_superlu_flags)
......@@ -39,6 +39,15 @@
by configure _and_ if the application uses the PARMETIS_CPPFLAGS */
#define HAVE_PARMETIS ENABLE_PARMETIS
/* Define to ENABLE_SUPERLU if the SuperLU library is available */
#cmakedefine HAVE_SUPERLU ENABLE_SUPERLU
/* define to 1 because older versions of SuperLU are no longer supported*/
#define SUPERLU_POST_2005_VERSION 1
/* define to 1 if SuperLU header slu_ddefs.h contains SLU_DOUBLE */
#cmakedefine SUPERLU_MIN_VERSION_4_3 @SUPERLU_MIN_VERSION_4_3@
/* end dune-istl
Everything below here will be overwritten
*/
......@@ -6,10 +6,10 @@ if(HAVE_PARDISO)
set(PARDISOTEST test_pardiso)
endif(HAVE_PARDISO)
if(HAVE_SUPERLU)
if(SUPERLU_FOUND)
set(SUPERLUTESTS superlutest superluztest superluctest superlustest
overlappingschwarztest)
endif(HAVE_SUPERLU)
endif(SUPERLU_FOUND)
if(HAVE_MPI)
set(MPITESTS vectorcommtest matrixmarkettest matrixredisttest)
......@@ -47,7 +47,7 @@ if(HAVE_PARDISO)
# TODO add pardiso flags
endif(HAVE_PARDISO)
if(HAVE_SUPERLU)
if(SUPERLU_FOUND)
add_executable(superlutest "superlutest.cc")
add_executable(superlustest "superlutest.cc")
......@@ -62,7 +62,7 @@ if(HAVE_SUPERLU)
add_executable(overlappingschwarztest "overlappingschwarztest.cc")
add_dune_superlu_flags("${SUPERLUTESTS}")
endif(HAVE_SUPERLU)
endif(SUPERLU_FOUND)
if(HAVE_MPI)
add_executable(matrixredisttest "matrixredisttest.cc")
......
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