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

[Merge][CMake] Merged revisions : 1615

Revision  r1615
.---------------------------
[CMake]
Add HAVE_SUPERLU et al. to config.h.
Update test set up to handle SuperLU tests correctly.


[[Imported from SVN: r1821]]
parents 49648763 13ed8a92
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)
......@@ -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