Skip to content

Commit 2e0cbba

Browse files
authored
Merge pull request #7 from polyfem/mtao/cpp20
h5pp works in cpp20 by killing off use of fmt
2 parents 119e825 + a294ed9 commit 2e0cbba

File tree

4 files changed

+4
-19
lines changed

4 files changed

+4
-19
lines changed

CMakeLists.txt

-4
Original file line numberDiff line numberDiff line change
@@ -123,10 +123,6 @@ target_link_libraries(paraviewo PUBLIC Eigen3::Eigen)
123123
include(tinyxml)
124124
target_link_libraries(paraviewo PUBLIC tinyxml2)
125125

126-
# fmt library
127-
include(fmt)
128-
target_link_libraries(paraviewo PUBLIC fmt::fmt)
129-
130126
# h5pp + HDF5 library
131127
include(hdf5)
132128
target_link_libraries(paraviewo PUBLIC hdf5::hdf5)

cmake/recipes/fmt.cmake

-11
This file was deleted.

cmake/recipes/h5pp.cmake

+3-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,9 @@ endif()
88
message(STATUS "Third-party: creating target 'h5pp'")
99

1010
SET(H5PP_ENABLE_EIGEN3 ON)
11-
SET(H5PP_ENABLE_FMT ON)
11+
SET(H5PP_ENABLE_FMT OFF)
12+
SET(H5PP_ENABLE_SPDLOG OFF)
1213
SET(H5PP_IS_SUBPROJECT ON)
1314

1415
include(CPM)
15-
CPMAddPackage("gh:wildmeshing/h5pp#9872c2f239271c711d572035cc689ae485e12a4c")
16+
CPMAddPackage("gh:wildmeshing/h5pp#b46d66b16c11f4e94752433e61d92b152be3d1d8")

src/paraviewo/PVDWriter.cpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#include "PVDWriter.hpp"
22

33
#include <tinyxml2.h>
4-
#include <fmt/core.h>
54

65
namespace paraviewo
76
{
@@ -27,7 +26,7 @@ namespace paraviewo
2726
for (int i = 0; i <= time_steps; i += skip_frame)
2827
{
2928
tinyxml2::XMLElement *dataset = collection->InsertNewChildElement("DataSet");
30-
dataset->SetAttribute("timestep", fmt::format("{:g}", t0 + i * dt).c_str());
29+
dataset->SetAttribute("timestep", std::to_string(t0 + i * dt).c_str());
3130
dataset->SetAttribute("group", "");
3231
dataset->SetAttribute("part", "0");
3332
dataset->SetAttribute("file", vtu_names(i).c_str());

0 commit comments

Comments
 (0)