enable_umfpack.cmake 948 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24

if (ENABLE_UMFPACK)
    if (WIN32)
        set(SuiteSparse_USE_LAPACK_BLAS ON)
    endif (WIN32)
    find_package(SuiteSparse)

    if (SuiteSparse_FOUND)
        include(${USE_SuiteSparse})
        list(APPEND COMPILEFLAGS "-DHAVE_UMFPACK=1" "-DMTL_HAS_UMFPACK")
    else (SuiteSparse_FOUND)
        find_file(UMFPACK_H umfpack.h
                    HINTS ENV CPATH /usr/include /usr/include/suitesparse /usr/include/ufsparse
                    DOC "headerfile umfpack.h for UMFPACK")
        if(UMFPACK_H)
            get_filename_component(UMFPACK_PATH ${UMFPACK_H} PATH)
            include_directories(${UMFPACK_PATH} ${UFCONFIG_PATH} ${AMD_PATH})
            list(APPEND COMPILEFLAGS "-DHAVE_UMFPACK=1" "-DMTL_HAS_UMFPACK")
        else()
            message(FATAL_ERROR "Could not find the UMFPACK header umfpack.h.")
        endif()
    endif (SuiteSparse_FOUND)
	SET(RPM_DEPEND_STR "blas")
endif (ENABLE_UMFPACK)