diff --git a/CMakeLists.txt b/CMakeLists.txt index 34e7211edf8da92cd30c2f478182bb270dd7ef4d..76d609cd275f93df221c02aab7ed6e6716930a69 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -186,27 +186,6 @@ option(OGS_USE_MFRONT "Enable solid material models by MFront (https://tfel.sourceforge.net)" OFF ) -# ---- Definitions ---- - -# Eigen -if(CMAKE_BUILD_TYPE STREQUAL "Debug") - add_definitions(-DEIGEN_INITIALIZE_MATRICES_BY_NAN) -endif() -if(EIGEN_NO_DEBUG) - add_definitions(-DEIGEN_NO_DEBUG) -endif() -if(EIGEN_DONT_VECTORIZE) - add_definitions(-DEIGEN_DONT_VECTORIZE) -endif() -if(OGS_EIGEN_DYNAMIC_SHAPE_MATRICES_INTERNAL) - add_definitions(-DOGS_EIGEN_DYNAMIC_SHAPE_MATRICES) -endif() -if(OGS_USE_EIGEN_UNSUPPORTED) - add_definitions(-DUSE_EIGEN_UNSUPPORTED) -endif() -if(OGS_EIGEN_INITIALIZE_MATRICES_BY_NAN) - add_definitions(-DEIGEN_INITIALIZE_MATRICES_BY_NAN) -endif() # Packaging include(scripts/cmake/packaging/Pack.cmake) diff --git a/MathLib/CMakeLists.txt b/MathLib/CMakeLists.txt index a6417a29849b64245a3a31ae43e45e70f0eb8a52..224123d70f32811a0168f4b1d12c10e262a64b72 100644 --- a/MathLib/CMakeLists.txt +++ b/MathLib/CMakeLists.txt @@ -53,7 +53,15 @@ endif() target_compile_definitions( MathLib - PUBLIC $<$<BOOL:${USE_LIS}>:USE_LIS> $<$<BOOL:${OGS_USE_PETSC}>:USE_PETSC> - $<$<BOOL:${OGS_USE_CVODE}>:CVODE_FOUND> + PUBLIC + $<$<BOOL:${USE_LIS}>:USE_LIS> + $<$<BOOL:${OGS_USE_PETSC}>:USE_PETSC> + $<$<BOOL:${OGS_USE_CVODE}>:CVODE_FOUND> + $<$<BOOL:${EIGEN_NO_DEBUG}>:EIGEN_NO_DEBUG> + $<$<BOOL:${EIGEN_DONT_VECTORIZE}>:EIGEN_DONT_VECTORIZE> + $<$<BOOL:${OGS_EIGEN_DYNAMIC_SHAPE_MATRICES_INTERNAL}>:OGS_EIGEN_DYNAMIC_SHAPE_MATRICES> + $<$<BOOL:${OGS_USE_EIGEN_UNSUPPORTED}>:USE_EIGEN_UNSUPPORTED> + $<$<BOOL:${OGS_EIGEN_INITIALIZE_MATRICES_BY_NAN}>:EIGEN_INITIALIZE_MATRICES_BY_NAN> + $<$<CONFIG:Debug>:EIGEN_INITIALIZE_MATRICES_BY_NAN> PRIVATE $<$<BOOL:${OGS_USE_MKL}>:USE_MKL> )