diff --git a/scripts/cmake/Dependencies.cmake b/scripts/cmake/Dependencies.cmake index a1b20907926..651c3fa067d 100644 --- a/scripts/cmake/Dependencies.cmake +++ b/scripts/cmake/Dependencies.cmake @@ -282,7 +282,10 @@ else() endif() if(OGS_BUILD_TESTING OR OGS_BUILD_UTILS) - CPMAddPackage(NAME vtkdiff GITHUB_REPOSITORY ufz/vtkdiff GIT_TAG 9754b4da43c6adfb65d201ed920b5f6ea27b38b9) + CPMAddPackage( + NAME vtkdiff GITHUB_REPOSITORY ufz/vtkdiff + GIT_TAG 9754b4da43c6adfb65d201ed920b5f6ea27b38b9 + ) if(vtkdiff_ADDED) install(PROGRAMS $ DESTINATION bin) endif() @@ -351,16 +354,20 @@ CPMAddPackage( if(OGS_BUILD_UTILS) if(NOT GUIX_BUILD) - set(_win_metis_options "MSVC FALSE") + set(_metis_options "MSVC FALSE") if(WIN32) - set(_win_metis_options "MSVC TRUE") + set(_metis_options "MSVC TRUE" "BUILD_SHARED_LIBS OFF") + else() + list(APPEND _metis_options + "CMAKE_C_FLAGS -D_POSIX_C_SOURCE=200809L" + ) endif() CPMFindPackage( NAME GKlib GIT_REPOSITORY https://github.com/KarypisLab/GKlib GIT_TAG 8bd6bad750b2b0d90800c632cf18e8ee93ad72d7 VERSION 5.1.1 - OPTIONS "CMAKE_POLICY_DEFAULT_CMP0042 NEW" ${_win_metis_options} + OPTIONS "CMAKE_POLICY_DEFAULT_CMP0042 NEW" ${_metis_options} EXCLUDE_FROM_ALL YES ) CPMFindPackage(