Skip to content

Commit

Permalink
[guix] MFront support.
Browse files Browse the repository at this point in the history
  • Loading branch information
bilke committed Nov 20, 2023
1 parent 2e2693a commit 3648cca
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 14 deletions.
7 changes: 5 additions & 2 deletions MaterialLib/SolidModels/MFront/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
26 changes: 15 additions & 11 deletions scripts/cmake/Dependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down
2 changes: 1 addition & 1 deletion scripts/guix/channels.scm
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 3648cca

Please sign in to comment.