From c28950c0f82487379a6c2389969051e41a0e65a5 Mon Sep 17 00:00:00 2001 From: Roland Kaufmann Date: Mon, 4 Feb 2013 22:23:59 +0100 Subject: [PATCH] Link to core function to get more realistic test Using umfpack_dl_solve as a test function increases the chance that the probe will not be able to link successfully if it has not found all libraries necessary (to link other than trivial test programs). --- cmake/Modules/FindSuiteSparse.cmake | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cmake/Modules/FindSuiteSparse.cmake b/cmake/Modules/FindSuiteSparse.cmake index b5d585f5..3d69a693 100644 --- a/cmake/Modules/FindSuiteSparse.cmake +++ b/cmake/Modules/FindSuiteSparse.cmake @@ -34,8 +34,9 @@ function (try_compile_umfpack varname) check_c_source_compiles ( "#include int main (void) { - double t; - t = umfpack_timer (); + double info, sym, num; + umfpack_dl_solve (UMFPACK_A, 0, 0, 0, 0, 0, &sym, &num, &info); + umfpack_timer (); return 0; }" ${varname}) cmake_pop_check_state ()