https://gitlab.opengeosys.org/ogs/ogs.git
Tip revision: d6e044a84380fdad9655c87ee88fc36874380c6b authored by Lars Bilke on 02 March 2015, 07:43:45 UTC
The RPATH is now set to the binaries location on Linux.
The RPATH is now set to the binaries location on Linux.
Tip revision: d6e044a
CMakeLists.txt
#Source files grouped by a directory
GET_SOURCE_FILES(SOURCES_MATHLIB)
set(SOURCES ${SOURCES_MATHLIB})
GET_SOURCE_FILES(SOURCES_INTERPOLATIONALGORITHMS InterpolationAlgorithms)
set(SOURCES ${SOURCES} ${SOURCES_INTERPOLATIONALGORITHMS})
GET_SOURCE_FILES(SOURCES_INTEGRATION Integration)
set(SOURCES ${SOURCES} ${SOURCES_INTEGRATION})
GET_SOURCE_FILES(SOURCES_LINALG LinAlg)
set(SOURCES ${SOURCES} ${SOURCES_LINALG})
GET_SOURCE_FILES(SOURCES_LINALG_DENSE LinAlg/Dense)
set(SOURCES ${SOURCES} ${SOURCES_LINALG_DENSE})
GET_SOURCE_FILES(SOURCES_LINALG_SPARSE LinAlg/Sparse)
set(SOURCES ${SOURCES} ${SOURCES_LINALG_SPARSE})
GET_SOURCE_FILES(SOURCES_LINALG_SOLVERS LinAlg/Solvers)
set(SOURCES ${SOURCES} ${SOURCES_LINALG_SOLVERS})
GET_SOURCE_FILES(SOURCES_LINALG_PRECOND LinAlg/Preconditioner)
set(SOURCES ${SOURCES} ${SOURCES_LINALG_PRECOND})
if(OGS_USE_LIS)
GET_SOURCE_FILES(SOURCES_LINALG_LIS LinAlg/Lis)
set(SOURCES ${SOURCES} ${SOURCES_LINALG_LIS})
endif()
if(OGS_USE_PETSC)
GET_SOURCE_FILES(SOURCES_LINALG_PETSC LinAlg/PETSc)
set(SOURCES ${SOURCES} ${SOURCES_LINALG_PETSC})
endif()
if(METIS_FOUND)
GET_SOURCE_FILES(SOURCES_LINALG_SPARSE_NESTEDDISSECTION LinAlg/Sparse/NestedDissectionPermutation)
set(SOURCES ${SOURCES} ${SOURCES_LINALG_SPARSE_NESTEDDISSECTION})
endif ()
GET_SOURCE_FILES(SOURCES_NONLINEAR Nonlinear)
set(SOURCES ${SOURCES} ${SOURCES_NONLINEAR})
include_directories(
.
../BaseLib
../GeoLib
)
if(METIS_FOUND)
include_directories(${METIS_INCLUDE_DIR})
endif()
if(OGS_USE_PETSC)
include_directories(LinAlg/PETSc)
GET_SOURCE_FILES(SOURCES_LINALG_PETSC LinAlg/PETSc)
set(SOURCES ${SOURCES} ${SOURCES_LINALG_PETSC})
endif()
# Create the library
add_library(MathLib STATIC ${SOURCES})
set_target_properties(MathLib PROPERTIES LINKER_LANGUAGE CXX)
target_link_libraries(MathLib
GeoLib
)
if(LAPACK_FOUND)
target_link_libraries(MathLib ${BLAS_LIBRARIES} ${LAPACK_LIBRARIES})
endif()
if (LIS_FOUND)
target_link_libraries(MathLib ${LIS_LIBRARIES})
endif()