diff --git a/scripts/cmake/ConanSetup.cmake b/scripts/cmake/ConanSetup.cmake index 36cf7667daa50034fa775d0c211ed8139330f287..23700f41b24b6d0f29f00ee8a58d2c8fd844dee1 100644 --- a/scripts/cmake/ConanSetup.cmake +++ b/scripts/cmake/ConanSetup.cmake @@ -11,7 +11,7 @@ if(OGS_USE_CONAN_lower STREQUAL "auto" AND POETRY) else() find_program(CONAN_CMD conan) 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 " "OGS_USE_CONAN=auto for automatic installation in the build directory " "OR install it system-wide (https://www.opengeosys.org/docs/devguide/" @@ -32,11 +32,6 @@ set(CONAN_SYSTEM_INCLUDES ON) 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) set(CONAN_REQUIRES ${CONAN_REQUIRES} netcdf-cxx/4.3.1-1@bilke/testing) endif() diff --git a/scripts/cmake/DependenciesExternalProject.cmake b/scripts/cmake/DependenciesExternalProject.cmake index 032ea1b7324471acf7fd01cb7c1cb3950b1c68d7..3eb0f15f6718f293dc87ed06de0b4fae228b699b 100644 --- a/scripts/cmake/DependenciesExternalProject.cmake +++ b/scripts/cmake/DependenciesExternalProject.cmake @@ -63,3 +63,20 @@ if(OGS_USE_PETSC) set_target_properties(petsc PROPERTIES IMPORTED_LOCATION ${PETSC_LIBRARIES}) target_compile_definitions(petsc INTERFACE USE_PETSC) 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() diff --git a/scripts/cmake/Find.cmake b/scripts/cmake/Find.cmake index 25387f83a50de19fe7a442442e99cb717aecadc8..fdf557b24b0e521b68ca352825abcd3b835ab182 100644 --- a/scripts/cmake/Find.cmake +++ b/scripts/cmake/Find.cmake @@ -104,11 +104,6 @@ find_package(LAPACK QUIET) # geotiff ## find_package(GEOTIFF) -# lis ## -if(OGS_USE_LIS) - find_package(LIS REQUIRED) -endif() - if(OGS_USE_MKL) find_package(MKL REQUIRED) endif() diff --git a/web/content/docs/devguide/getting-started/prerequisites.md b/web/content/docs/devguide/getting-started/prerequisites.md index 323cc6c2785aeba1e978f2dfdf9efbeb5390c6f5..e40357f66fe78c00b54d5947e05c965a0e2259e4 100644 --- a/web/content/docs/devguide/getting-started/prerequisites.md +++ b/web/content/docs/devguide/getting-started/prerequisites.md @@ -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: -- `OGS_USE_LIS` - `OGS_USE_NETCDF` – NetCDF IO, requires netcdf-cxx4 Install Conan (>= {{< dataFile "versions.minimum_version.conan" >}}) with Python's pip: diff --git a/web/data/versions.json b/web/data/versions.json index 1ffdf73dd414955b48de668d4322a70b47137cef..31f7999fef66ebb8ef2fd5d620615345c4978630 100644 --- a/web/data/versions.json +++ b/web/data/versions.json @@ -22,7 +22,8 @@ "snakemake": "5.27.4", "hdf5": "1.10.5", "libxml2": "2.9.12", - "tfel-rliv": "3.4" + "tfel-rliv": "3.4", + "lis": "1.7.37" }, "tested_version": { "ubuntu": "20.04",