From 3648ccaecd18470a3008399a8b93622a01557c52 Mon Sep 17 00:00:00 2001 From: Lars Bilke Date: Fri, 17 Nov 2023 13:35:34 +0100 Subject: [PATCH] [guix] MFront support. --- MaterialLib/SolidModels/MFront/CMakeLists.txt | 7 +++-- scripts/cmake/Dependencies.cmake | 26 +++++++++++-------- scripts/guix/channels.scm | 2 +- 3 files changed, 21 insertions(+), 14 deletions(-) diff --git a/MaterialLib/SolidModels/MFront/CMakeLists.txt b/MaterialLib/SolidModels/MFront/CMakeLists.txt index 8021c7ea307..a2ff665a8b3 100644 --- a/MaterialLib/SolidModels/MFront/CMakeLists.txt +++ b/MaterialLib/SolidModels/MFront/CMakeLists.txt @@ -22,7 +22,10 @@ target_include_directories( target_compile_definitions( MaterialLib_SolidModels_MFront PRIVATE OGS_USE_MFRONT ) -install(TARGETS MFrontGenericInterface) +if(NOT GUIX_BUILD) + install(TARGETS MFrontGenericInterface) +endif() + # Setup / build mfront behaviours lib set(_mfront_behaviours @@ -46,7 +49,7 @@ set(_mfront_behaviours ThermoPoroElasticity ) -if(OGS_BUILD_WHEEL AND NOT APPLE_ARM) +if((OGS_BUILD_WHEEL AND NOT APPLE_ARM) OR GUIX_BUILD) # Build behaviours lib with mfront executable foreach(behaviour ${_mfront_behaviours}) list(APPEND _mfront_behaviour_files diff --git a/scripts/cmake/Dependencies.cmake b/scripts/cmake/Dependencies.cmake index a02ce8a5e01..7d0fd120818 100644 --- a/scripts/cmake/Dependencies.cmake +++ b/scripts/cmake/Dependencies.cmake @@ -136,17 +136,21 @@ if(Eigen3_ADDED) endif() if(OGS_USE_MFRONT) - set(CMAKE_REQUIRE_FIND_PACKAGE_TFEL TRUE) - CPMAddPackage( - NAME MGIS - GITHUB_REPOSITORY thelfer/MFrontGenericInterfaceSupport - GIT_TAG rliv-2.0 - OPTIONS "enable-doxygen-doc OFF" "enable-fortran-bindings OFF" - "enable-website OFF" - EXCLUDE_FROM_ALL YES - ) - if(MGIS_ADDED) - list(APPEND DISABLE_WARNINGS_TARGETS MFrontGenericInterface) + if(GUIX_BUILD) + find_package (MFrontGenericInterface REQUIRED) + else() + set(CMAKE_REQUIRE_FIND_PACKAGE_TFEL TRUE) + CPMAddPackage( + NAME MGIS + GITHUB_REPOSITORY thelfer/MFrontGenericInterfaceSupport + GIT_TAG rliv-2.0 + OPTIONS "enable-doxygen-doc OFF" "enable-fortran-bindings OFF" + "enable-website OFF" + EXCLUDE_FROM_ALL YES + ) + if(MGIS_ADDED) + list(APPEND DISABLE_WARNINGS_TARGETS MFrontGenericInterface) + endif() endif() endif() diff --git a/scripts/guix/channels.scm b/scripts/guix/channels.scm index 9855f7b64a5..28f80841b39 100644 --- a/scripts/guix/channels.scm +++ b/scripts/guix/channels.scm @@ -2,7 +2,7 @@ (name 'guix-ogs) (url "https://gitlab.opengeosys.org/ogs/inf/guix-ogs.git") (branch "master") - (commit "f5f9b9c1a61527968c1848c3fbaef4a9bc44c891")) + (commit "95b4189b8fe00e176f57f834d0731c7f25e8c9f0")) (channel (name 'guix) (url "https://git.savannah.gnu.org/git/guix.git")