Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-istl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Stephan Hilb
dune-istl
Commits
d851e961
Commit
d851e961
authored
12 years ago
by
Christoph Grüninger
Browse files
Options
Downloads
Patches
Plain Diff
[CMake] Add FindSuperLU.cmake. HAVE_SUPERLU is not yet set, it'll follow.
[[Imported from SVN: r1602]]
parent
152ed684
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
cmake/modules/DuneIstlMacros.cmake
+1
-0
1 addition, 0 deletions
cmake/modules/DuneIstlMacros.cmake
cmake/modules/FindSuperLU.cmake
+79
-0
79 additions, 0 deletions
cmake/modules/FindSuperLU.cmake
with
80 additions
and
0 deletions
cmake/modules/DuneIstlMacros.cmake
+
1
−
0
View file @
d851e961
include
(
FindBoostFusion
)
include
(
FindParMETIS
)
include
(
FindSuperLU
)
This diff is collapsed.
Click to expand it.
cmake/modules/FindSuperLU.cmake
0 → 100644
+
79
−
0
View file @
d851e961
#
# Module that checks whether SuperLU is available and usable.
# SuperLU must be a version released after the year 2005.
#
# Sets the follwing variable:
#
# SUPERLU_FOUND True if SuperLU available and usable.
# SUPERLU_MIN_VERSION_4_3 True if SuperLU version >= 4.3.
# SUPERLU_WITH_VERSION Human readable string containing version information.
# SUPERLU_INCLUDE_DIRS Path to the SuperLU include dirs.
# SUPERLU_LIBRARIES Name to the SuperLU library.
#
find_package
(
BLAS QUIET REQUIRED
)
if
(
NOT BLAS_FOUND AND REQUIRED
)
message
(
"BLAS not found but required for SuperLU"
)
return
()
endif
(
NOT BLAS_FOUND AND REQUIRED
)
# look for header files
find_path
(
SUPERLU_INCLUDE_DIR
NAMES supermatrix.h
PATH_SUFFIXES
"superlu"
"include/superlu"
"include"
"SRC"
)
# look for library
find_library
(
SUPERLU_LIBRARY
NAMES
"libsuperlu.a"
"libsuperlu_4.3.a"
"libsuperlu_4.2.a"
"libsuperlu_4.1.a"
"libsuperlu_4.0.a"
"libsuperlu_3.1.a"
"libsuperlu_3.0.a"
PATH_SUFFIXES
"lib"
"lib64"
)
# check if version is 4.3
include
(
CheckCSourceCompiles
)
set
(
CMAKE_REQUIRED_INCLUDES
${
SUPERLU_INCLUDE_DIR
}
)
set
(
CMAKE_REQUIRED_LIBRARIES
${
SUPERLU_LIBRARY
}
)
CHECK_C_SOURCE_COMPILES
(
"
#include <slu_ddefs.h>
int main(void)
{
return SLU_DOUBLE;
}"
SUPERLU_MIN_VERSION_4_3
)
set
(
CMAKE_REQUIRED_INCLUDES
""
)
set
(
CMAKE_REQUIRED_LIBRARIES
""
)
if
(
SUPERLU_MIN_VERSION_4_3
)
set
(
SUPERLU_WITH_VERSION
"SuperLU >= 4.3"
)
else
()
set
(
SUPERLU_WITH_VERSION
"SuperLU <= 4.2, post 2005"
)
endif
(
SUPERLU_MIN_VERSION_4_3
)
# behave like a CMake module is supposed to behave
include
(
FindPackageHandleStandardArgs
)
find_package_handle_standard_args
(
"SuperLU"
DEFAULT_MSG
SUPERLU_INCLUDE_DIR
SUPERLU_LIBRARY
)
mark_as_advanced
(
SUPERLU_INCLUDE_DIRS SUPERLU_LIBRARIES
)
# if both headers and library are found, store results
if
(
SUPERLU_FOUND
)
set
(
SUPERLU_INCLUDE_DIRS
${
SUPERLU_INCLUDE_DIR
}
)
set
(
SUPERLU_LIBRARIES
${
SUPERLU_LIBRARY
}
)
# log result
file
(
APPEND
${
CMAKE_BINARY_DIR
}${
CMAKE_FILES_DIRECTORY
}
/CMakeOutput.log
"Determing location of
${
SUPERLU_WITH_VERSION
}
succeded:
\n
"
"Include directory:
${
SUPERLU_INCLUDE_DIR
}
\n
"
"Library directory:
${
SUPERLU_LIBRARY
}
\n\n
"
)
set
(
SUPERLU_CPPFLAGS
"-I
${
SUPERLU_INCLUDE_DIRS
}
-DENABLE_SUPERLU"
)
set
(
SUPERLU_LIBS
"-L.
${
SUPERLU_LIBRARIES
}
${
BLAS_LIBRARIES
}
"
)
else
(
SUPERLU_FOUND
)
# log errornous result
file
(
APPEND
${
CMAKE_BINARY_DIR
}${
CMAKE_FILES_DIRECTORY
}
/CMakeError.log
"Determing location of SuperLU failed:
\n
"
"Include directory:
${
SUPERLU_INCLUDE_DIR
}
\n
"
"Library directory:
${
SUPERLU_LIBRARY
}
\n\n
"
)
endif
(
SUPERLU_FOUND
)
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment