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

[FindSuperLU]

Add test for HAVE_MEM_USAGE_T_EXPANSIONS needed for SuperLU 3.0.
This fixes CMake Bug #133.

[[Imported from SVN: r1655]]
parent 6c08cf64
No related branches found
No related tags found
No related merge requests found
......@@ -30,10 +30,22 @@ find_library(SUPERLU_LIBRARY
PATH_SUFFIXES "lib" "lib64"
)
# check if version is 4.3
# check version specific macros
include(CheckCSourceCompiles)
set(CMAKE_REQUIRED_INCLUDES ${SUPERLU_INCLUDE_DIR})
set(CMAKE_REQUIRED_LIBRARIES ${SUPERLU_LIBRARY})
# check whether "mem_usage_t.expansions" was found in "slu_ddefs.h"
CHECK_C_SOURCE_COMPILES("
#include <slu_ddefs.h>
int main(void)
{
mem_usage_t mem;
return mem.expansions;
}"
HAVE_MEM_USAGE_T_EXPANSIONS)
# check whether version is at least 4.3
CHECK_C_SOURCE_COMPILES("
#include <slu_ddefs.h>
int main(void)
......
......@@ -45,6 +45,9 @@
/* define to 1 because older versions of SuperLU are no longer supported*/
#define SUPERLU_POST_2005_VERSION 1
/* Define to 1 if 'expansions' is a member of 'mem_usage_t'. */
#cmakedefine HAVE_MEM_USAGE_T_EXPANSIONS @HAVE_MEM_USAGE_T_EXPANSIONS@
/* define to 1 if SuperLU header slu_ddefs.h contains SLU_DOUBLE */
#cmakedefine SUPERLU_MIN_VERSION_4_3 @SUPERLU_MIN_VERSION_4_3@
......
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