← Back to team overview

dolfin team mailing list archive

Re: [Branch ~dolfin-core/dolfin/main] Rev 4928: More work on UMFPACK test, link problems. I'm only getting an empty list

 

There is a minor typo in line 29:

-CMAKE_REQUIRE_LIBRARIES
+CMAKE_REQUIRED_LIBRARIES

Johannes

On Tue, Aug 10, 2010 at 3:06 PM,  <noreply@xxxxxxxxxxxxx> wrote:
> ------------------------------------------------------------
> revno: 4928
> committer: Anders Logg <logg@xxxxxxxxx>
> branch nick: dolfin-dev
> timestamp: Tue 2010-08-10 15:03:42 +0200
> message:
>  More work on UMFPACK test, link problems. I'm only getting an empty list
>  of libraries. Anyone knows how to fix this?
> modified:
>  cmake/FindUMFPACK.dolfin.cmake
>
>
> --
> lp:dolfin
> https://code.launchpad.net/~dolfin-core/dolfin/main
>
> Your team DOLFIN Core Team is subscribed to branch lp:dolfin.
> To unsubscribe from this branch go to https://code.launchpad.net/~dolfin-core/dolfin/main/+edit-subscription
>
> === modified file 'cmake/FindUMFPACK.dolfin.cmake'
> --- cmake/FindUMFPACK.dolfin.cmake      2010-08-10 11:37:46 +0000
> +++ cmake/FindUMFPACK.dolfin.cmake      2010-08-10 13:03:42 +0000
> @@ -3,18 +3,33 @@
>  message(STATUS "checking for package 'UMFPACK'")
>
>  # Check for header file
> -find_path(UMFPACK_INCLUDE_DIR suitesparse/umfpack.h
> +find_path(UMFPACK_INCLUDE_DIR umfpack.h
>   $ENV{UMFPACK_DIR}
> -  /usr/local/include
> -  /usr/include
> +  /usr/local/include/suitesparse
> +  /usr/include/suitesparse
>   DOC "Directory where the UMFPACK header is located"
>   )
> +mark_as_advanced(UMFPACK_INCLUDE_DIR)
> +
> +# Check for library
> +find_library(UMFPACK_LIBRARY
> +  NAMES umfpack
> +  HINTS $ENV{UMFPACK_DIR}
> +  PATHS /usr/local /opt/local /sw
> +  PATH_SUFFIXES lib lib64
> +  DOC "The UMFPACK library"
> +  )
> +mark_as_advanced(UMFPACK_LIBRARY)
>
>  # Try compiling and running test program
> -if(UMFPACK_INCLUDE_DIR)
> +if(UMFPACK_INCLUDE_DIR AND UMFPACK_LIBRARY)
>   message("   found package 'UMFPACK'")
>   include(CheckCXXSourceRuns)
>   set(CMAKE_REQUIRED_INCLUDES ${UMFPACK_INCLUDE_DIR})
> +  set(CMAKE_REQUIRE_LIBRARIES ${UMFPACK_LIBRARY})
> +
> +  message("includes = ${CMAKE_REQUIRED_INCLUDES}")
> +  message("libs     = ${CMAKE_REQUIRED_LIBRARIES}")
>   check_cxx_source_runs("
>  /* Test program umfpack-ex1.c */
>
> @@ -47,7 +62,7 @@
>     message("   unable to run test program for package 'UMFPACK'")
>   endif(NOT UMFPACK_TEST_RUNS)
>
> -endif(UMFPACK_INCLUDE_DIR)
> +endif(UMFPACK_INCLUDE_DIR AND UMFPACK_LIBRARY)
>
>  # Report results of tests
>  if(UMFPACK_TEST_RUNS)
>
>
>



Follow ups