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
Commits
c40196fe
Commit
c40196fe
authored
6 years ago
by
Praetorius, Simon
Browse files
Options
Downloads
Patches
Plain Diff
check whether BACKEND is either MTL, EIGEN, or ISTL
parent
0215302f
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!13
check whether BACKEND is either MTL, EIGEN, or ISTL
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
cmake/modules/AmdisMacros.cmake
+8
-4
8 additions, 4 deletions
cmake/modules/AmdisMacros.cmake
config.h.cmake
+2
-2
2 additions, 2 deletions
config.h.cmake
with
10 additions
and
6 deletions
cmake/modules/AmdisMacros.cmake
+
8
−
4
View file @
c40196fe
...
...
@@ -4,7 +4,7 @@ include(AddAmdisExecutable)
set
(
BACKEND
"ISTL"
CACHE STRING
"LinearAlgebra backend. One of MTL, EIGEN, ISTL"
)
set_property
(
CACHE BACKEND PROPERTY STRINGS
"MTL"
"EIGEN"
"ISTL"
)
if
(
BACKEND STREQUAL
"MTL"
)
if
(
BACKEND STREQUAL
"MTL"
OR BACKEND STREQUAL
"MTL4"
)
find_package
(
MTL REQUIRED
PATHS /usr/local/lib/mtl4 /opt/sources/mtl4 /opt/development/mtl4
)
...
...
@@ -28,7 +28,7 @@ if (BACKEND STREQUAL "MTL")
COMPILE_DEFINITIONS
${
MTL_COMPILE_DEFINITIONS
}
INCLUDE_DIRS
${
MTL_INCLUDE_DIRS
}
)
endif
(
MTL_FOUND
)
elseif
(
BACKEND STREQUAL
"EIGEN"
)
elseif
(
BACKEND STREQUAL
"EIGEN"
OR BACKEND STREQUAL
"EIGEN3"
)
find_package
(
Eigen3 REQUIRED 3.3.5
)
set
(
HAVE_EIGEN EIGEN_FOUND
)
...
...
@@ -39,6 +39,10 @@ elseif (BACKEND STREQUAL "EIGEN")
COMPILE_DEFINITIONS
${
EIGEN3_DEFINITIONS
}
INCLUDE_DIRS
${
EIGEN3_INCLUDE_DIRS
}
)
endif
(
EIGEN3_FOUND
)
elseif
(
NOT dune-istl_FOUND
)
message
(
FATAL
"Need dune-istl, MTL, or Eigen3 as linear algebra backend. Change flag BACKEND!"
)
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!"
)
endif
()
else
()
message
(
FATAL_ERROR
"BACKEND must be one of MTL, EIGEN, ISTL"
)
endif
()
This diff is collapsed.
Click to expand it.
config.h.cmake
+
2
−
2
View file @
c40196fe
...
...
@@ -41,10 +41,10 @@
#define AMDIS_VERSION_REVISION @AMDIS_VERSION_REVISION@
/* Define to ENABLE_MTL if the MTL library is available */
#cmakedefine HAVE_MTL
ENABLE_MTL
#cmakedefine HAVE_MTL
1
/* Define to ENABLE_EIGEN if the Eigen3 library is available */
#cmakedefine HAVE_EIGEN
ENABLE_EIGEN
#cmakedefine HAVE_EIGEN
1
/* some detected compiler features may be used in AMDiS */
#cmakedefine AMDIS_HAS_CXX_FOLD_EXPRESSIONS 1
...
...
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