Skip to content
Snippets Groups Projects
Verified Commit 5dcf00c2 authored by Lars Bilke's avatar Lars Bilke
Browse files

Moved LIS dependency from Conan to ExternalProject.

parent 03d91666
No related branches found
No related tags found
No related merge requests found
...@@ -11,7 +11,7 @@ if(OGS_USE_CONAN_lower STREQUAL "auto" AND POETRY) ...@@ -11,7 +11,7 @@ if(OGS_USE_CONAN_lower STREQUAL "auto" AND POETRY)
else() else()
find_program(CONAN_CMD conan) find_program(CONAN_CMD conan)
endif() endif()
if(NOT CONAN_CMD AND (OGS_USE_LIS OR OGS_USE_NETCDF)) if(NOT CONAN_CMD AND OGS_USE_NETCDF)
message(WARNING "conan executable not found. Specify CMake option " message(WARNING "conan executable not found. Specify CMake option "
"OGS_USE_CONAN=auto for automatic installation in the build directory " "OGS_USE_CONAN=auto for automatic installation in the build directory "
"OR install it system-wide (https://www.opengeosys.org/docs/devguide/" "OR install it system-wide (https://www.opengeosys.org/docs/devguide/"
...@@ -32,11 +32,6 @@ set(CONAN_SYSTEM_INCLUDES ON) ...@@ -32,11 +32,6 @@ set(CONAN_SYSTEM_INCLUDES ON)
include(${PROJECT_SOURCE_DIR}/scripts/cmake/conan/conan.cmake) include(${PROJECT_SOURCE_DIR}/scripts/cmake/conan/conan.cmake)
if(OGS_USE_LIS)
list(APPEND CONAN_OPTIONS lis:with_omp=True)
set(CONAN_REQUIRES ${CONAN_REQUIRES} lis/1.7.37@bilke/stable)
endif()
if(OGS_USE_NETCDF) if(OGS_USE_NETCDF)
set(CONAN_REQUIRES ${CONAN_REQUIRES} netcdf-cxx/4.3.1-1@bilke/testing) set(CONAN_REQUIRES ${CONAN_REQUIRES} netcdf-cxx/4.3.1-1@bilke/testing)
endif() endif()
......
...@@ -63,3 +63,20 @@ if(OGS_USE_PETSC) ...@@ -63,3 +63,20 @@ if(OGS_USE_PETSC)
set_target_properties(petsc PROPERTIES IMPORTED_LOCATION ${PETSC_LIBRARIES}) set_target_properties(petsc PROPERTIES IMPORTED_LOCATION ${PETSC_LIBRARIES})
target_compile_definitions(petsc INTERFACE USE_PETSC) target_compile_definitions(petsc INTERFACE USE_PETSC)
endif() endif()
if(OGS_USE_LIS)
find_package(LIS)
if(NOT LIS_FOUND)
BuildExternalProject(
LIS
GIT_REPOSITORY https://github.com/anishida/lis.git
GIT_TAG ${ogs.minimum_version.lis}
CONFIGURE_COMMAND ./configure --enable-omp --prefix=<INSTALL_DIR>
BUILD_IN_SOURCE ON
BUILD_COMMAND make -j
INSTALL_COMMAND make -j install
)
set(ENV{LIS_ROOT_DIR} ${PROJECT_BINARY_DIR}/_ext/LIS)
find_package(LIS REQUIRED)
endif()
endif()
...@@ -104,11 +104,6 @@ find_package(LAPACK QUIET) ...@@ -104,11 +104,6 @@ find_package(LAPACK QUIET)
# geotiff ## # geotiff ##
find_package(GEOTIFF) find_package(GEOTIFF)
# lis ##
if(OGS_USE_LIS)
find_package(LIS REQUIRED)
endif()
if(OGS_USE_MKL) if(OGS_USE_MKL)
find_package(MKL REQUIRED) find_package(MKL REQUIRED)
endif() endif()
......
...@@ -313,7 +313,6 @@ See Linux-tab! ...@@ -313,7 +313,6 @@ See Linux-tab!
You only need Conan if you intend to build with one of the following settings **and** do not want to install their dependencies manually: You only need Conan if you intend to build with one of the following settings **and** do not want to install their dependencies manually:
- `OGS_USE_LIS`
- `OGS_USE_NETCDF` – NetCDF IO, requires netcdf-cxx4 - `OGS_USE_NETCDF` – NetCDF IO, requires netcdf-cxx4
Install Conan (>= {{< dataFile "versions.minimum_version.conan" >}}) with Python's pip: Install Conan (>= {{< dataFile "versions.minimum_version.conan" >}}) with Python's pip:
......
...@@ -22,7 +22,8 @@ ...@@ -22,7 +22,8 @@
"snakemake": "5.27.4", "snakemake": "5.27.4",
"hdf5": "1.10.5", "hdf5": "1.10.5",
"libxml2": "2.9.12", "libxml2": "2.9.12",
"tfel-rliv": "3.4" "tfel-rliv": "3.4",
"lis": "1.7.37"
}, },
"tested_version": { "tested_version": {
"ubuntu": "20.04", "ubuntu": "20.04",
......
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