Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
iwr
amdis
Commits
383830fc
Commit
383830fc
authored
Jan 22, 2019
by
Praetorius, Simon
Browse files
Merge branch 'issue/cmake_umfpack' into 'dev'
corrected search for umfpack library files See merge request
!25
parents
a1439087
b4bb0b6f
Changes
2
Hide whitespace changes
Inline
Side-by-side
AMDiS/cmake3/AMDIS.cmake.in
View file @
383830fc
...
...
@@ -78,7 +78,7 @@ target_enable_boost(amdis_base INTERFACE ON)
# --------------------
if (AMDIS_NEED_UMFPACK)
set(AMDIS_SuiteSparse_DIR @SuiteSparse_DIR@)
set(AMDIS_UMFPACK_ROOT_DIR @UMFPACK_
INCLUDE_DIRS@/..
)
set(AMDIS_UMFPACK_ROOT_DIR @UMFPACK_
ROOT_DIR@
)
target_enable_umfpack(amdis_base INTERFACE ON)
endif (AMDIS_NEED_UMFPACK)
...
...
AMDiS/cmake3/target_enable_umfpack.cmake
View file @
383830fc
...
...
@@ -26,12 +26,13 @@ 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_ROOT_DIR
}
PATH_PREFIXES lib lib64
HINTS
${
AMDIS_UMFPACK_ROOT_DIR
}
PATHS $ENV{EBROOTSUITESPARSE}
PATH_SUFFIXES lib/ lib64/
DOC
"Library file for UMFPACK"
)
find_file
(
UMFPACK_H umfpack.h
HINTS
${
AMDIS_UMFPACK_ROOT_DIR
}
/include
PATHS /usr/include/suitesparse /usr/include/ufsparse
HINTS
${
AMDIS_UMFPACK_ROOT_DIR
}
/include
PATHS /usr/include/suitesparse /usr/include/ufsparse
$ENV{EBROOTSUITESPARSE}/include
DOC
"Headerfile umfpack.h for UMFPACK"
)
if
(
UMFPACK_H AND UMFPACK_LIBRARY
)
...
...
@@ -41,6 +42,12 @@ macro(target_enable_umfpack _TARGET_ _SCOPE_)
get_filename_component
(
UMFPACK_LIB_PATH
${
UMFPACK_LIBRARY
}
PATH
)
set
(
FOUND_SUITESPARSE_LIBS
${
UMFPACK_LIBRARY
}
)
# extract root directory from umfpack lib dir
set
(
UMFPACK_ROOT_DIR
${
UMFPACK_LIB_PATH
}
/..
)
if
(
NOT EXISTS
${
UMFPACK_ROOT_DIR
}
/include
)
message
(
WARNING
"directory
${
UMFPACK_ROOT_DIR
}
is not a valid root dir of an umfpack installation."
)
endif
()
if
(
LINK_EXECUTABLE OR APPLE
)
# find all connected libraries
...
...
@@ -74,7 +81,12 @@ macro(target_enable_umfpack _TARGET_ _SCOPE_)
target_link_libraries
(
${
_TARGET_
}
${
_SCOPE_
}
${
FOUND_SUITESPARSE_LIBS
}
)
endif
(
LINK_EXECUTABLE OR APPLE
)
else
()
message
(
FATAL_ERROR
"Could not find the UMFPACK header umfpack.h."
)
if
(
NOT UMFPACK_H
)
message
(
FATAL_ERROR
"Could not find the UMFPACK header umfpack.h."
)
endif
()
if
(
NOT UMFPACK_LIBRARY
)
message
(
FATAL_ERROR
"Could not find the UMFPACK library libumfpack.so"
)
endif
()
endif
(
UMFPACK_H AND UMFPACK_LIBRARY
)
endif
(
SuiteSparse_FOUND
)
...
...
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