diff --git a/cmake/dependencies/toml11.cmake b/cmake/dependencies/toml11.cmake index 000e285a7f..3bc46e3ee0 100644 --- a/cmake/dependencies/toml11.cmake +++ b/cmake/dependencies/toml11.cmake @@ -64,10 +64,10 @@ set(openPMD_toml11_src "" "Local path to toml11 source directory (preferred if set)") # tarball fetcher -set(openPMD_toml11_tar "https://github.com/ToruNiina/toml11/archive/refs/tags/v4.4.0.tar.gz" +set(openPMD_toml11_tar "https://github.com/ToruNiina/toml11/archive/b32a2fff0d27e1f7522f26a125101500ddb47156.tar.gz" CACHE STRING "Remote tarball link to pull and build toml11 from if(openPMD_USE_INTERNAL_TOML11)") -set(openPMD_toml11_tar_hash "SHA256=815bfe6792aa11a13a133b86e7f0f45edc5d71eb78f5fb6686c49c7f792b9049" +set(openPMD_toml11_tar_hash "SHA256=c82df2d6a437795a1b5ac0b87886d5eb481deb60d6e79adb1688017857347cda" CACHE STRING "Hash checksum of the tarball of toml11 if(openPMD_USE_INTERNAL_TOML11)") @@ -75,7 +75,7 @@ set(openPMD_toml11_tar_hash "SHA256=815bfe6792aa11a13a133b86e7f0f45edc5d71eb78f5 set(openPMD_toml11_repo "https://github.com/ToruNiina/toml11.git" CACHE STRING "Repository URI to pull and build toml11 from if(openPMD_USE_INTERNAL_TOML11)") -set(openPMD_toml11_branch "v4.4.0" +set(openPMD_toml11_branch "b32a2fff0d27e1f7522f26a125101500ddb47156" CACHE STRING "Repository branch for openPMD_toml11_repo if(openPMD_USE_INTERNAL_TOML11)") diff --git a/include/openPMD/auxiliary/JSON_internal.hpp b/include/openPMD/auxiliary/JSON_internal.hpp index 14375b2067..0bdc81c458 100644 --- a/include/openPMD/auxiliary/JSON_internal.hpp +++ b/include/openPMD/auxiliary/JSON_internal.hpp @@ -23,17 +23,17 @@ #include "openPMD/config.hpp" -#include -#include -#include +#include "openPMD/auxiliary/toml11_wrapper.hpp" -#include +#include #if openPMD_HAVE_MPI #include #endif +#include #include // std::shared_ptr +#include #include // std::forward namespace openPMD diff --git a/include/openPMD/auxiliary/toml11_wrapper.hpp b/include/openPMD/auxiliary/toml11_wrapper.hpp new file mode 100644 index 0000000000..496696b94b --- /dev/null +++ b/include/openPMD/auxiliary/toml11_wrapper.hpp @@ -0,0 +1,25 @@ +/* Copyright 2026 Franz Poeschel + * + * This file is part of openPMD-api. + * + * openPMD-api is free software: you can redistribute it and/or modify + * it under the terms of of either the GNU General Public License or + * the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * openPMD-api is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License and the GNU Lesser General Public License + * for more details. + * + * You should have received a copy of the GNU General Public License + * and the GNU Lesser General Public License along with openPMD-api. + * If not, see . + */ + +#pragma once + +#define TOML11_DISABLE_SOURCE_LOCATION +#include diff --git a/src/IO/JSON/JSONIOHandlerImpl.cpp b/src/IO/JSON/JSONIOHandlerImpl.cpp index 551b6c4358..9308af2e62 100644 --- a/src/IO/JSON/JSONIOHandlerImpl.cpp +++ b/src/IO/JSON/JSONIOHandlerImpl.cpp @@ -31,12 +31,12 @@ #include "openPMD/auxiliary/Memory.hpp" #include "openPMD/auxiliary/StringManip.hpp" #include "openPMD/auxiliary/TypeTraits.hpp" +#include "openPMD/auxiliary/toml11_wrapper.hpp" #include "openPMD/backend/Attribute.hpp" #include "openPMD/backend/Writable.hpp" #include #include -#include #include #include diff --git a/src/auxiliary/JSON.cpp b/src/auxiliary/JSON.cpp index 85dca840eb..ad0b613a61 100644 --- a/src/auxiliary/JSON.cpp +++ b/src/auxiliary/JSON.cpp @@ -26,10 +26,10 @@ #include "openPMD/auxiliary/Filesystem.hpp" #include "openPMD/auxiliary/StringManip.hpp" #include "openPMD/auxiliary/Variant.hpp" +#include "openPMD/auxiliary/toml11_wrapper.hpp" #include #include -#include #include #include // std::isspace