Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
amdis-core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
External wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Analyze
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
amdis
amdis-core
Merge requests
!80
Feature/petsc cmake
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Feature/petsc cmake
feature/petsc_cmake
into
master
Overview
1
Commits
4
Changes
6
All threads resolved!
Hide all comments
Merged
Praetorius, Simon
requested to merge
feature/petsc_cmake
into
master
5 years ago
Overview
1
Commits
4
Changes
6
All threads resolved!
Hide all comments
Expand
added cmake modules FindPETSc
1
0
Merge request reports
Compare
master
version 1
29391e4b
5 years ago
master (base)
and
version 1
latest version
6a949e5e
4 commits,
5 years ago
version 1
29391e4b
3 commits,
5 years ago
6 files
+
200
−
9
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
6
Search (e.g. *.vue) (Ctrl+P)
cmake/modules/AmdisMacros.cmake
+
16
−
5
Options
include
(
AmdisCXXFeatures
)
include
(
AddAmdisExecutable
)
set
(
BACKEND
"ISTL"
CACHE STRING
"LinearAlgebra backend. One of MTL, EIGEN, ISTL"
)
set_property
(
CACHE BACKEND PROPERTY STRINGS
"MTL"
"EIGEN"
"ISTL"
)
if
(
NOT BACKEND
)
set
(
BACKEND
"ISTL"
CACHE STRING
"LinearAlgebra backend. One of MTL, EIGEN, PETSC, ISTL"
)
set_property
(
CACHE BACKEND PROPERTY STRINGS
"MTL"
"EIGEN"
"ISTL"
"PETSC"
)
endif
(
NOT BACKEND
)
if
(
BACKEND STREQUAL
"MTL"
OR BACKEND STREQUAL
"MTL4"
)
find_package
(
MTL REQUIRED
)
set
(
HAVE_MTL
MTL_FOUND
)
set
(
HAVE_MTL
TRUE
)
if
(
MTL_FOUND
)
message
(
STATUS
" Found MTL, version:
${
MTL_VERSION
}
"
)
dune_register_package_flags
(
LIBRARIES MTL::MTL COMPILE_DEFINITIONS
"ENABLE_MTL=1"
)
endif
(
MTL_FOUND
)
elseif
(
BACKEND STREQUAL
"EIGEN"
OR BACKEND STREQUAL
"EIGEN3"
)
find_package
(
Eigen3 REQUIRED 3.3.5
)
set
(
HAVE_EIGEN
EIGEN_FOUND
)
set
(
HAVE_EIGEN
TRUE
)
if
(
EIGEN3_FOUND
)
message
(
STATUS
" Found Eigen3, version:
${
Eigen3_VERSION
}
"
)
dune_register_package_flags
(
LIBRARIES Eigen3::Eigen COMPILE_DEFINITIONS
"ENABLE_EIGEN=1"
)
endif
(
EIGEN3_FOUND
)
elseif
(
BACKEND STREQUAL
"PETSC"
)
find_package
(
PETSc REQUIRED
)
if
(
PETSc_FOUND
)
set
(
HAVE_PETSC TRUE
)
dune_register_package_flags
(
LIBRARIES PETSc::PETSc COMPILE_DEFINITIONS
"ENABLE_PETSC=1"
)
endif
(
PETSc_FOUND
)
elseif
(
BACKEND STREQUAL
"ISTL"
)
if
(
NOT dune-istl_FOUND
)
message
(
FATAL_ERROR
"Need dune-istl, MTL, or Eigen3 as linear algebra backend. Change flag BACKEND!"
)
message
(
FATAL_ERROR
"Need dune-istl, MTL,
PETSc,
or Eigen3 as linear algebra backend. Change flag BACKEND!"
)
endif
()
else
()
message
(
FATAL_ERROR
"BACKEND must be one of MTL, EIGEN, ISTL"
)
endif
()
set
(
DUNE_CUSTOM_PKG_CONFIG_SECTION
"set(BACKEND
\"
${
BACKEND
}
\"
)"
)
\ No newline at end of file
Loading