Skip to content
Snippets Groups Projects
Commit e46a59a2 authored by Norihiro Watanabe's avatar Norihiro Watanabe
Browse files

add CMake option OGS_USE_EIGEN

parent 8fb3b578
No related branches found
No related tags found
No related merge requests found
...@@ -56,6 +56,10 @@ OPTION(OGS_NO_EXTERNAL_LIBS "Builds OGS without any external dependencies." OFF) ...@@ -56,6 +56,10 @@ OPTION(OGS_NO_EXTERNAL_LIBS "Builds OGS without any external dependencies." OFF)
# Linear solvers # Linear solvers
OPTION(OGS_USE_LIS "Use Lis" OFF) OPTION(OGS_USE_LIS "Use Lis" OFF)
# Eigen
OPTION(OGS_USE_EIGEN "Use EIGEN for local matrix and vector" ON)
OPTION(EIGEN_NO_DEBUG "Disables Eigen's assertions" ON)
# Logging # Logging
OPTION(OGS_DISABLE_LOGGING "Disables all logog messages." OFF) OPTION(OGS_DISABLE_LOGGING "Disables all logog messages." OFF)
...@@ -105,6 +109,15 @@ IF(OGS_USE_LIS) ...@@ -105,6 +109,15 @@ IF(OGS_USE_LIS)
ADD_DEFINITIONS(-DUSE_LIS) ADD_DEFINITIONS(-DUSE_LIS)
ENDIF() ENDIF()
IF(OGS_USE_EIGEN)
# ADD_DEFINITIONS(-DEIGEN_DEFAULT_DENSE_INDEX_TYPE=std::size_t)
ADD_DEFINITIONS(-DEIGEN_INITIALIZE_MATRICES_BY_ZERO)
ADD_DEFINITIONS(-DOGS_USE_EIGEN)
IF (EIGEN_NO_DEBUG)
ADD_DEFINITIONS(-DEIGEN_NO_DEBUG)
ENDIF()
ENDIF()
ADD_SUBDIRECTORY( AssemblerLib ) ADD_SUBDIRECTORY( AssemblerLib )
ADD_SUBDIRECTORY( BaseLib ) ADD_SUBDIRECTORY( BaseLib )
# TODO This is a hack but we have to make sure that Boost is built first # TODO This is a hack but we have to make sure that Boost is built first
......
...@@ -163,5 +163,10 @@ ENDIF() # Shapelib_FOUND ...@@ -163,5 +163,10 @@ ENDIF() # Shapelib_FOUND
## lis ## ## lis ##
IF(OGS_USE_LIS) IF(OGS_USE_LIS)
FIND_PACKAGE( LIS REQUIRED ) FIND_PACKAGE( LIS REQUIRED )
ENDIF()
## Eigen ##
IF(OGS_USE_EIGEN)
FIND_PACKAGE( Eigen3 REQUIRED )
ENDIF() ENDIF()
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment