Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Aland, Sebastian
amdis
Commits
55b11aee
Commit
55b11aee
authored
Oct 21, 2016
by
Praetorius, Simon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
umfpack cmake configuration adopted to taurus system
parent
ea84748d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
33 additions
and
22 deletions
+33
-22
AMDiS/cmake3/target_enable_umfpack.cmake
AMDiS/cmake3/target_enable_umfpack.cmake
+33
-22
No files found.
AMDiS/cmake3/target_enable_umfpack.cmake
View file @
55b11aee
...
...
@@ -26,38 +26,49 @@ macro(target_enable_umfpack _TARGET_ _SCOPE_)
else
(
SuiteSparse_FOUND
)
# find umfpack manually by searching for umfpack.h header file
find_library
(
UMFPACK_LIBRARY umfpack
HINTS
${
AMDIS_UMFPACK_LIB_DIR
}
HINTS
${
AMDIS_UMFPACK_LIB_DIR
}
${
SUITESPARSE_LIB
}
$ENV{SUITESPARSE_LIB}
DOC
"Library file for UMFPACK"
)
find_file
(
UMFPACK_H umfpack.h
HINTS
${
AMDIS_UMFPACK_INCLUDE_DIR
}
ENV CPATH /usr/include /usr/include/suitesparse /usr/include/ufsparse
HINTS
${
AMDIS_UMFPACK_INCLUDE_DIR
}
${
SUITESPARSE_INC
}
$ENV{SUITESPARSE_INC}
ENV CPATH /usr/include /usr/include/suitesparse /usr/include/ufsparse
DOC
"Headerfile umfpack.h for UMFPACK"
)
if
(
UMFPACK_H AND UMFPACK_LIBRARY
)
get_filename_component
(
UMFPACK_PATH
${
UMFPACK_H
}
PATH
)
target_include_directories
(
${
_TARGET_
}
${
_SCOPE_
}
${
UMFPACK_PATH
}
)
get_filename_component
(
UMFPACK_LIB_PATH
${
UMFPACK_LIBRARY
}
PATH
)
set
(
FOUND_SUITESPARSE_LIBS
${
UMFPACK_LIBRARY
}
)
# find all connected libraries
find_library
(
AMD_LIBRARY amd HINTS
${
UMFPACK_LIB_PATH
}
)
find_library
(
BLAS_LIBRARY NAMES blas openblas HINTS
${
UMFPACK_LIB_PATH
}
/usr/lib /usr/lib/openblas-base
)
find_library
(
CHOLMOD_LIBRARY cholmod HINTS
${
UMFPACK_LIB_PATH
}
)
find_library
(
COLAMD_LIBRARY colamd HINTS
${
UMFPACK_LIB_PATH
}
)
find_library
(
SUITESPARSECONFIG_LIBRARY suitesparseconfig HINTS
${
UMFPACK_LIB_PATH
}
)
if
(
AMD_LIBRARY AND BLAS_LIBRARY
)
list
(
APPEND FOUND_SUITESPARSE_LIBS
${
AMD_LIBRARY
}
${
BLAS_LIBRARY
}
)
endif
(
AMD_LIBRARY AND BLAS_LIBRARY
)
if
(
CHOLMOD_LIBRARY
)
list
(
APPEND FOUND_SUITESPARSE_LIBS
${
CHOLMOD_LIBRARY
}
)
endif
(
CHOLMOD_LIBRARY
)
if
(
COLAMD_LIBRARY
)
list
(
APPEND FOUND_SUITESPARSE_LIBS
${
COLAMD_LIBRARY
}
)
endif
(
COLAMD_LIBRARY
)
if
(
SUITESPARSECONFIG_LIBRARY
)
list
(
APPEND FOUND_SUITESPARSE_LIBS
${
SUITESPARSECONFIG_LIBRARY
}
)
endif
(
SUITESPARSECONFIG_LIBRARY
)
target_include_directories
(
${
_TARGET_
}
${
_SCOPE_
}
${
UMFPACK_PATH
}
)
if
(
LINK_EXECUTABLE
)
# find all connected libraries
find_library
(
AMD_LIBRARY amd HINTS
${
UMFPACK_LIB_PATH
}
)
find_library
(
BLAS_LIB
NAMES blas fblas openblas
HINTS
${
BLAS_DIR
}
/lib
${
UMFPACK_LIB_PATH
}
/usr/lib/openblas-base /usr/lib/atlas-base
)
if
(
BLAS_LIB
)
set
(
BLAS_LIBRARIES
${
BLAS_LIB
}
)
else
(
BLAS_LIB
)
find_package
(
BLAS REQUIRED
)
endif
(
BLAS_LIB
)
find_library
(
CHOLMOD_LIBRARY cholmod HINTS
${
UMFPACK_LIB_PATH
}
)
find_library
(
COLAMD_LIBRARY colamd HINTS
${
UMFPACK_LIB_PATH
}
)
find_library
(
SUITESPARSECONFIG_LIBRARY suitesparseconfig HINTS
${
UMFPACK_LIB_PATH
}
)
if
(
AMD_LIBRARY AND BLAS_LIBRARIES
)
list
(
APPEND FOUND_SUITESPARSE_LIBS
${
AMD_LIBRARY
}
${
BLAS_LIBRARIES
}
)
endif
(
AMD_LIBRARY AND BLAS_LIBRARIES
)
if
(
CHOLMOD_LIBRARY
)
list
(
APPEND FOUND_SUITESPARSE_LIBS
${
CHOLMOD_LIBRARY
}
)
endif
(
CHOLMOD_LIBRARY
)
if
(
COLAMD_LIBRARY
)
list
(
APPEND FOUND_SUITESPARSE_LIBS
${
COLAMD_LIBRARY
}
)
endif
(
COLAMD_LIBRARY
)
if
(
SUITESPARSECONFIG_LIBRARY
)
list
(
APPEND FOUND_SUITESPARSE_LIBS
${
SUITESPARSECONFIG_LIBRARY
}
)
endif
(
SUITESPARSECONFIG_LIBRARY
)
target_link_libraries
(
${
_TARGET_
}
${
_SCOPE_
}
${
FOUND_SUITESPARSE_LIBS
}
)
endif
(
LINK_EXECUTABLE
)
else
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment