diff --git a/.guix/modules/ogs-package.scm b/.guix/modules/ogs-package.scm index 62e5bf93c48f72ff9bfda6e88ac073956d788d1d..197ab846af3a0815c41e791156771c8628f01bfe 100644 --- a/.guix/modules/ogs-package.scm +++ b/.guix/modules/ogs-package.scm @@ -70,7 +70,6 @@ #:cmake ,cmake)) ;for newer CMake version (inputs (list boost eigen - fmt googletest hdf5 json-modern-cxx diff --git a/Applications/Utils/MeshEdit/checkMesh.cpp b/Applications/Utils/MeshEdit/checkMesh.cpp index c5405ebdec2cd7738bd3dd11330d129832e7921e..db2e7b28f2ff0abe1c6912b780ba6bb95b6ff55c 100644 --- a/Applications/Utils/MeshEdit/checkMesh.cpp +++ b/Applications/Utils/MeshEdit/checkMesh.cpp @@ -13,7 +13,7 @@ #include <mpi.h> #endif -#include <fmt/ranges.h> +#include <spdlog/fmt/bundled/ranges.h> #include <array> #include <string> diff --git a/BaseLib/FileTools.cpp b/BaseLib/FileTools.cpp index e5145ffc74f2ce85d71b94ce28ed56834fc37157..f00f5988937fce4c9fdb6f3ad7d2cfcc1879bd90 100644 --- a/BaseLib/FileTools.cpp +++ b/BaseLib/FileTools.cpp @@ -14,7 +14,7 @@ #include "FileTools.h" -#include <fmt/core.h> +#include <spdlog/fmt/bundled/core.h> #include <boost/algorithm/string/predicate.hpp> #include <filesystem> diff --git a/BaseLib/PrjProcessing.cpp b/BaseLib/PrjProcessing.cpp index 5a0d898dca344f54239bd0f83b175d7789a7f20b..3fa4f66c6419760025f24d0990a78b8a4fe5e6a7 100644 --- a/BaseLib/PrjProcessing.cpp +++ b/BaseLib/PrjProcessing.cpp @@ -10,10 +10,10 @@ #include "PrjProcessing.h" -#include <fmt/core.h> #include <libxml/globals.h> #include <libxml/parser.h> #include <libxml/xmlstring.h> +#include <spdlog/fmt/bundled/core.h> #include <xml_patch.h> #include <filesystem> diff --git a/GeoLib/AABB.h b/GeoLib/AABB.h index 3a05f55a50bd50c4030385a03890c91e42df27fd..2ea2d00be31f9856984493a185b4cec399937040 100644 --- a/GeoLib/AABB.h +++ b/GeoLib/AABB.h @@ -14,7 +14,7 @@ #pragma once -#include <fmt/ostream.h> +#include <spdlog/fmt/bundled/ostream.h> #include <Eigen/Core> #include <bitset> diff --git a/GeoLib/CMakeLists.txt b/GeoLib/CMakeLists.txt index 153810e21b48310bd94056ab0d5cfbe52bea32a6..a75c3e83b381730bee8a4cc363503f4b55a25d1c 100644 --- a/GeoLib/CMakeLists.txt +++ b/GeoLib/CMakeLists.txt @@ -17,7 +17,7 @@ target_link_libraries( PUBLIC BaseLib Eigen3::Eigen MathLib $<$<BOOL:${OGS_BUILD_GUI}>:rapidxml> $<$<BOOL:${OGS_BUILD_GUI}>:Qt5::Xml> $<$<BOOL:${OGS_BUILD_GUI}>:Qt5::XmlPatterns> - fmt::fmt-header-only + spdlog::spdlog PRIVATE range-v3 tet ) diff --git a/MaterialLib/SolidModels/SelectSolidConstitutiveRelation.h b/MaterialLib/SolidModels/SelectSolidConstitutiveRelation.h index d909481a864e3d1d866a44f74cd46dd04a1961a2..a41192168bb1a5164aea8779d494a6c1fda7aba2 100644 --- a/MaterialLib/SolidModels/SelectSolidConstitutiveRelation.h +++ b/MaterialLib/SolidModels/SelectSolidConstitutiveRelation.h @@ -9,7 +9,7 @@ #pragma once -#include <fmt/ranges.h> +#include <spdlog/fmt/bundled/ranges.h> #include <map> #include <range/v3/view/map.hpp> diff --git a/MathLib/CMakeLists.txt b/MathLib/CMakeLists.txt index d184bfca005c861f6fc8a5019f8195843f6495cc..1ec14a85f866396b37f4007352c645f11116ceca 100644 --- a/MathLib/CMakeLists.txt +++ b/MathLib/CMakeLists.txt @@ -34,7 +34,7 @@ target_link_libraries( $<$<BOOL:${OGS_USE_PETSC}>:petsc> Eigen3::Eigen $<$<TARGET_EXISTS:OpenMP::OpenMP_CXX>:OpenMP::OpenMP_CXX> - fmt::fmt-header-only + spdlog::spdlog ) if(OGS_USE_LIS) diff --git a/MathLib/FormattingUtils.h b/MathLib/FormattingUtils.h index 54996fe363a481b0c430eeb103a10e933bc7e84f..1ee97ddc2ff802eda074725c640fe9b903045f9f 100644 --- a/MathLib/FormattingUtils.h +++ b/MathLib/FormattingUtils.h @@ -10,7 +10,7 @@ #pragma once -#include <fmt/ostream.h> +#include <spdlog/fmt/bundled/ostream.h> #include <Eigen/Core> #include <concepts> diff --git a/MeshToolsLib/CMakeLists.txt b/MeshToolsLib/CMakeLists.txt index 60cf16694867a591c1ca8bfca30b0beadc47fdab..dd60ad0270411e6e6228b5deaa7615c177f8171a 100644 --- a/MeshToolsLib/CMakeLists.txt +++ b/MeshToolsLib/CMakeLists.txt @@ -9,7 +9,8 @@ append_source_files(SOURCES MeshQuality) ogs_add_library(MeshToolsLib ${SOURCES}) target_link_libraries( - MeshToolsLib PUBLIC MeshLib + MeshToolsLib PUBLIC GeoLib + MeshLib range-v3 VTK::IOXML VTK::IOLegacy diff --git a/NumLib/ODESolver/PETScNonlinearSolver.cpp b/NumLib/ODESolver/PETScNonlinearSolver.cpp index 91dc37f21610b04a95c797b6a5cad75710bd011c..cd137f357f158299798ee8a07ead952bad44f412 100644 --- a/NumLib/ODESolver/PETScNonlinearSolver.cpp +++ b/NumLib/ODESolver/PETScNonlinearSolver.cpp @@ -12,9 +12,9 @@ #include "PETScNonlinearSolver.h" -#include <fmt/core.h> #include <petscmat.h> #include <petscvec.h> +#include <spdlog/fmt/bundled/core.h> #include "BaseLib/RunTime.h" diff --git a/ProcessLib/Assembly/MatrixOutput.cpp b/ProcessLib/Assembly/MatrixOutput.cpp index ca1004899f1d97676bb1478535411c7643139fd8..5eaa76d2a2c8c4a8a2f93934128fd255dfc0f5e9 100644 --- a/ProcessLib/Assembly/MatrixOutput.cpp +++ b/ProcessLib/Assembly/MatrixOutput.cpp @@ -10,7 +10,7 @@ #include "MatrixOutput.h" -#include <fmt/ostream.h> +#include <spdlog/fmt/bundled/ostream.h> #include <optional> #include <unordered_set> diff --git a/ProcessLib/ThermoRichardsMechanics/ThermoRichardsMechanicsFEM-impl.h b/ProcessLib/ThermoRichardsMechanics/ThermoRichardsMechanicsFEM-impl.h index fca55c74931c5cb34208ef2c8ba6bb5277c2db90..8d371f6a0242c3a6a2516a52ffa5060679f4d254 100644 --- a/ProcessLib/ThermoRichardsMechanics/ThermoRichardsMechanicsFEM-impl.h +++ b/ProcessLib/ThermoRichardsMechanics/ThermoRichardsMechanicsFEM-impl.h @@ -11,7 +11,7 @@ #pragma once -#include <fmt/format.h> +#include <spdlog/fmt/bundled/format.h> #include <Eigen/LU> #include <cassert> diff --git a/Tests/MaterialLib/CheckStiffnessMatrixMFront.cpp b/Tests/MaterialLib/CheckStiffnessMatrixMFront.cpp index 3d62c2f0b09b85e8b69d6e5c2d353e180862534d..76e961ecc55f19a440e1a70fbad328ae492e918e 100644 --- a/Tests/MaterialLib/CheckStiffnessMatrixMFront.cpp +++ b/Tests/MaterialLib/CheckStiffnessMatrixMFront.cpp @@ -9,9 +9,9 @@ #ifdef OGS_USE_MFRONT -#include <fmt/format.h> #include <gmock/gmock-matchers.h> #include <gtest/gtest.h> +#include <spdlog/fmt/bundled/format.h> #include "BaseLib/ConfigTree.h" #include "MaterialLib/SolidModels/MFront/CreateMFrontGeneric.h" diff --git a/ThirdParty/collection b/ThirdParty/collection index d57a65125b9693556de26e1c47d8da7c5d3e776c..c0f03942707bba49aaef1d1dd150852ff30ecead 160000 --- a/ThirdParty/collection +++ b/ThirdParty/collection @@ -1 +1 @@ -Subproject commit d57a65125b9693556de26e1c47d8da7c5d3e776c +Subproject commit c0f03942707bba49aaef1d1dd150852ff30ecead diff --git a/scripts/cmake/CheckHeaderCompilation.cmake b/scripts/cmake/CheckHeaderCompilation.cmake index fd8adb5cacda8907339b1b83935b990d2affcfb2..05bdeec710626823f175e6e53020a5b6c7d9c8c4 100644 --- a/scripts/cmake/CheckHeaderCompilation.cmake +++ b/scripts/cmake/CheckHeaderCompilation.cmake @@ -39,13 +39,12 @@ function(_check_header_compilation target) foreach( lib ${LINK_LIBS} - spdlog + spdlog::spdlog Boost::boost Eigen3::Eigen nlohmann_json::nlohmann_json range-v3 # petsc; is given via ${PETSC_INCLUDES} below. - fmt::fmt-header-only ) # Ignore non-existing targets or interface libs if(NOT TARGET ${lib}) diff --git a/scripts/cmake/CompilerSetup.cmake b/scripts/cmake/CompilerSetup.cmake index 13081c36390849f2b8455a4df3d5253fd9328dc0..f83458804f8e74fbb911ef36a864a6f2dbd7c84b 100644 --- a/scripts/cmake/CompilerSetup.cmake +++ b/scripts/cmake/CompilerSetup.cmake @@ -67,7 +67,9 @@ if(COMPILER_IS_GCC OR COMPILER_IS_CLANG OR COMPILER_IS_INTEL) endif() add_compile_options($<$<COMPILE_LANGUAGE:CXX>:-fext-numeric-literals>) include(GCCSanitizer) - if(CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 13.1.1) + if(CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 13.1.1 + OR CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 13.2.1 + ) # See https://gitlab.opengeosys.org/ogs/ogs/-/merge_requests/4597 add_compile_options( $<$<COMPILE_LANGUAGE:CXX>:-Wno-dangling-reference> @@ -76,14 +78,6 @@ if(COMPILER_IS_GCC OR COMPILER_IS_CLANG OR COMPILER_IS_INTEL) $<$<COMPILE_LANGUAGE:CXX>:-Wno-stringop-overread> ) endif() - if(CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL 13.2.1) - # A smaller set than that for 13.1.1 - add_compile_options( - $<$<COMPILE_LANGUAGE:CXX>:-Wno-dangling-reference> - $<$<COMPILE_LANGUAGE:CXX>:-Wno-array-bounds> - $<$<COMPILE_LANGUAGE:CXX>:-Wno-stringop-overread> - ) - endif() endif() if(COMPILER_IS_CLANG) diff --git a/scripts/cmake/Dependencies.cmake b/scripts/cmake/Dependencies.cmake index e7726529879182ec5ff07841a2a79129082c4966..a9c2487e8c151250731fa6b0eb27badc5a5b75fa 100644 --- a/scripts/cmake/Dependencies.cmake +++ b/scripts/cmake/Dependencies.cmake @@ -31,28 +31,14 @@ if(OGS_BUILD_TESTING) endif() endif() -# Check spdlog release for compatible fmt release. fmt may be provided by vtk -# _ext build. -if(NOT TARGET fmt::fmt-header-only) - CPMFindPackage( - NAME fmt - GIT_TAG 10.1.0 - GITHUB_REPOSITORY fmtlib/fmt - EXCLUDE_FROM_ALL YES - ) -endif() -CPMFindPackage( - NAME spdlog - GITHUB_REPOSITORY gabime/spdlog - VERSION 1.12.0 - OPTIONS "BUILD_SHARED_LIBS OFF" "SPDLOG_BUILD_SHARED OFF" - "SPDLOG_FMT_EXTERNAL_HO 1" -) -if(spdlog_ADDED) - set_target_properties( - spdlog - PROPERTIES INTERFACE_SYSTEM_INCLUDE_DIRECTORIES - $<TARGET_PROPERTY:spdlog,INTERFACE_INCLUDE_DIRECTORIES> +if(GUIX_BUILD) + find_package(spdlog REQUIRED) +else() + CPMAddPackage( + NAME spdlog + GITHUB_REPOSITORY gabime/spdlog + VERSION 1.12.0 + OPTIONS "BUILD_SHARED_LIBS OFF" ) endif() diff --git a/web/data/versions.json b/web/data/versions.json index 0a470d972e81f4f484b2b033406d0a2ab07f0955..6eda2385be264420a5c048489e3ae33706d90cb5 100644 --- a/web/data/versions.json +++ b/web/data/versions.json @@ -73,8 +73,8 @@ } }, "cpm": { - "package_file_id": 749, - "package_file_sha256": "25862fd9b76d5c685cd60432396507822dd547e7ee2e87dffb1126603574efad" + "package_file_id": 865, + "package_file_sha256": "00db04d08660e131c41fcc20b9cc4046516223c668b0d422e3002775e4d4e967" }, "ext": { "cache_hash": "4ebd62e0ce484732dbf3cd9932f60b67762e156b"