Skip to content

Commit 5d93ce0

Browse files
Use most recent main branch of toml11 (#1874)
* Update toml11 to current main tag b32a2fff0d27e1f7522f26a125101500ddb47156 * Define TOML11_DISABLE_SOURCE_LOCATION (up for discussion)
1 parent a218134 commit 5d93ce0

5 files changed

Lines changed: 34 additions & 9 deletions

File tree

cmake/dependencies/toml11.cmake

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,18 +64,18 @@ set(openPMD_toml11_src ""
6464
"Local path to toml11 source directory (preferred if set)")
6565

6666
# tarball fetcher
67-
set(openPMD_toml11_tar "https://github.com/ToruNiina/toml11/archive/refs/tags/v4.4.0.tar.gz"
67+
set(openPMD_toml11_tar "https://github.com/ToruNiina/toml11/archive/b32a2fff0d27e1f7522f26a125101500ddb47156.tar.gz"
6868
CACHE STRING
6969
"Remote tarball link to pull and build toml11 from if(openPMD_USE_INTERNAL_TOML11)")
70-
set(openPMD_toml11_tar_hash "SHA256=815bfe6792aa11a13a133b86e7f0f45edc5d71eb78f5fb6686c49c7f792b9049"
70+
set(openPMD_toml11_tar_hash "SHA256=c82df2d6a437795a1b5ac0b87886d5eb481deb60d6e79adb1688017857347cda"
7171
CACHE STRING
7272
"Hash checksum of the tarball of toml11 if(openPMD_USE_INTERNAL_TOML11)")
7373

7474
# Git fetcher
7575
set(openPMD_toml11_repo "https://github.com/ToruNiina/toml11.git"
7676
CACHE STRING
7777
"Repository URI to pull and build toml11 from if(openPMD_USE_INTERNAL_TOML11)")
78-
set(openPMD_toml11_branch "v4.4.0"
78+
set(openPMD_toml11_branch "b32a2fff0d27e1f7522f26a125101500ddb47156"
7979
CACHE STRING
8080
"Repository branch for openPMD_toml11_repo if(openPMD_USE_INTERNAL_TOML11)")
8181

include/openPMD/auxiliary/JSON_internal.hpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,17 +23,17 @@
2323

2424
#include "openPMD/config.hpp"
2525

26-
#include <deque>
27-
#include <nlohmann/json.hpp>
28-
#include <toml.hpp>
26+
#include "openPMD/auxiliary/toml11_wrapper.hpp"
2927

30-
#include <optional>
28+
#include <nlohmann/json.hpp>
3129

3230
#if openPMD_HAVE_MPI
3331
#include <mpi.h>
3432
#endif
3533

34+
#include <deque>
3635
#include <memory> // std::shared_ptr
36+
#include <optional>
3737
#include <utility> // std::forward
3838

3939
namespace openPMD
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/* Copyright 2026 Franz Poeschel
2+
*
3+
* This file is part of openPMD-api.
4+
*
5+
* openPMD-api is free software: you can redistribute it and/or modify
6+
* it under the terms of of either the GNU General Public License or
7+
* the GNU Lesser General Public License as published by
8+
* the Free Software Foundation, either version 3 of the License, or
9+
* (at your option) any later version.
10+
*
11+
* openPMD-api is distributed in the hope that it will be useful,
12+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+
* GNU General Public License and the GNU Lesser General Public License
15+
* for more details.
16+
*
17+
* You should have received a copy of the GNU General Public License
18+
* and the GNU Lesser General Public License along with openPMD-api.
19+
* If not, see <http://www.gnu.org/licenses/>.
20+
*/
21+
22+
#pragma once
23+
24+
#define TOML11_DISABLE_SOURCE_LOCATION
25+
#include <toml.hpp>

src/IO/JSON/JSONIOHandlerImpl.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,12 @@
3131
#include "openPMD/auxiliary/Memory.hpp"
3232
#include "openPMD/auxiliary/StringManip.hpp"
3333
#include "openPMD/auxiliary/TypeTraits.hpp"
34+
#include "openPMD/auxiliary/toml11_wrapper.hpp"
3435
#include "openPMD/backend/Attribute.hpp"
3536
#include "openPMD/backend/Writable.hpp"
3637

3738
#include <iomanip>
3839
#include <sstream>
39-
#include <toml.hpp>
4040

4141
#include <algorithm>
4242
#include <exception>

src/auxiliary/JSON.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@
2626
#include "openPMD/auxiliary/Filesystem.hpp"
2727
#include "openPMD/auxiliary/StringManip.hpp"
2828
#include "openPMD/auxiliary/Variant.hpp"
29+
#include "openPMD/auxiliary/toml11_wrapper.hpp"
2930

3031
#include <limits>
3132
#include <queue>
32-
#include <toml.hpp>
3333

3434
#include <algorithm>
3535
#include <cctype> // std::isspace

0 commit comments

Comments
 (0)