PDI 1.13.0

the PDI data interface

fmt.h
1/*******************************************************************************
2 * Copyright (C) 2024 Commissariat a l'energie atomique et aux energies alternatives (CEA)
3 * Copyright (C) 2026 Julien Bigot <julien@julien-bigot.fr>
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are met:
8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 * * Neither the name of CEA nor the names of its contributors may be used to
14 * endorse or promote products derived from this software without specific
15 * prior written permission.
16 *
17 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23 * THE SOFTWARE.
24 ******************************************************************************/
25
26#ifndef PDI_FMT_H_
27#define PDI_FMT_H_
28
29// this is a header designed to support fmt provided as either a standalone of embedded in spdlog
30
31#include <spdlog/spdlog.h>
32#if !defined(SPDLOG_FMT_EXTERNAL)
33#ifdef SPDLOG_HEADER_ONLY
34#ifndef FMT_HEADER_ONLY
35#define FMT_HEADER_ONLY
36#endif
37#endif
38#include <spdlog/fmt/bundled/core.h>
39#include <spdlog/fmt/bundled/format.h>
40#include <spdlog/fmt/bundled/ranges.h>
41#else // SPDLOG_FMT_EXTERNAL is defined - use external fmtlib
42#include <fmt/core.h>
43#include <fmt/format.h>
44#include <fmt/ranges.h>
45#endif
46
47#endif // PDI_FMT_H_